openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pankajpriyadarshi <pankydud...@gmail.com>
Subject Re: Savepoint issue with OpenJPA
Date Sat, 22 Dec 2012 00:46:00 GMT
Pinaki,
                  Our application transaction does fail and a commit would
not be succesful with savepoint. In the test case I wrote, the entities used
do not have a foreign key constraint defined in the database. If there was a
foreign key constraint between the entities, off course the commit would
have failed. The reason would be that the child table insert is fired first
before the parent table insert.

I am not aware of entities in the OpenJPA source code that have foreign key
constraints defined, that is the reason I chose Employee, Task and Story
tables. As I mentioned if there were foreign key constraints between the
Employee, Task and Story tables, the commit would have failed. Also as I
mentioned in my original post, our tables are well defined relational tables
and have foreign constraints enforced (as are most mature table designs), so
this bug would cause commit failures.

My idea of writing the test cases was to show that the insert order has
changed and hence would cause foreign constraint violations. If you can let
me know entities in the OpenJPA source code that have foreign constraints
enforced, I could change the test case to show that the commit would fail.

Thank You.



--
View this message in context: http://openjpa.208410.n2.nabble.com/Savepoint-issue-with-OpenJPA-tp7581548p7582357.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Mime
View raw message