openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpa_user <>
Subject Incosistent Persist Operation
Date Tue, 22 Jul 2008 11:55:54 GMT


I have a class A which has 3 ManyToOne references. When I try to persist A
the insert queries fired are inconsistent.
As a result entire persist opertation fails

Class A
  B b;
  C c;
  D d;

out of 3 references I would be setting b and c and leave d as null. 
When I persist Object of A with b and c also as new instances the behaviour
of persist is inconsistent.

I have put postload methods in each of the B,C classes and printing the
auto-gererated hexadecimal UID. Every time the values of UID gets printed
but i dont see the corresponding query of insert into either B or C. 
If inserts are fired for B and C then the transaction is properly complete.

I am unable to see any error in the log generated other than the insert
failure thrown by db due to foreign key violation( Though it doesnt insert
either b or c it would try to insert A which would fail).

Any thoughts of where could be the problem would be of great help.

Srinivas KLP
View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message