openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: Savepoint issue with OpenJPA
Date Sat, 22 Dec 2012 01:25:19 GMT
> of course the commit would have failed. The reason would be that the child
table insert is fired first before the parent table insert. 

Not necessarily correct. 

As I had mentioned, OpenJPA is capable of ordering the SQL statements such
that the existing foreign key constraints are honored. This facility
requires that OpenJPA is instructed to read existing foreign key constraints
from the database schema. A common way is to specify
      <property name="openjpa.jdbc.SynchronizeMappings"

If you observe that OpenJPA fails to recorder the SQL despite such a
setting, then we will consider that to be a defect.

> If you can let me know entities in the OpenJPA source code that have
> foreign constraints enforced
OpenJPA has 4000+ test cases and some of them, I am sure, uses foreign keys. 

> the topological sort is not being done based on foreign key constraints as
> you would normally expect. 
what is the basis of this statement? The savepoint feature is sparingly
used, so I am not certain, but I would presume that whether OpenJPA reorders
the SQL statements during flush/commit has nothing to do with whether
savepoint feature has been used or not.

Pinaki Poddar
Chair, Apache OpenJPA Project
View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message