Issue Details (XML | Word | Printable)

Key: NUCRDBMS-467
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: William Draï
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Incorrect ordering of delete statements during JPA delete orphan

Created: 30/Sep/10 11:26 PM   Updated: 10/Dec/10 07:49 AM   Resolved: 14/Nov/10 07:22 PM
Component/s: ORM
Affects Version/s: 2.1.1
Fix Version/s: 2.2.0.release

File Attachments: 1. Zip Archive testorphan.zip (7 kB)


Datastore: HSQL


 Description  « Hide
Using orphanRemoval does not work correctly with the following case :

A -> oneToMany <-> B -> manyToOne -> C

With all cascading, removing one B from the set of A correctly triggers orphan removal of the associated B and C.
The problem is that DN tries to delete C before B and gets a foreign key constraint violation.

See test case here: http://www.graniteds.org/public/testorphan.rar



Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 01/Oct/10 09:17 AM
No idea what that testcase format is, but certainly not one defined in our docs ... i.e should be more like 4Kb not 4Mb

William Draï added a comment - 01/Oct/10 09:31 AM
Here it is

Andy Jefferson added a comment - 14/Nov/10 07:22 PM
SVN trunk passes that test