Details
-
Bug
-
Resolution: Done
-
Major
-
EAP_EWP 5.1.0_CR1, EAP_EWP 5.1.0_CR2, EAP_EWP 5.1.0_CR3, EAP_EWP 5.1.0
-
None
-
Release Notes
-
Workaround Exists
-
-
-
Documented as Resolved Issue
Description
Consider:
a table with an assigned PK (i.e. not auto-increment), let's call this "A"
Another table ("B") linked to the table listed above but with it's PK set to auto-increment.
Now if you try to save B with cascading switched on, it will break. From the little debugging I've done it looks like:
a) hibernate detects that A needs to be saved first, but puts it into some sort of queue.
b) when it hits B, it short-circuits this save queue and tries to save B immediately so as to obtain a PK reference for B. This fails since A hasn't been yet been saved so it's link is still null.
----------
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3334
Attachments
Issue Links
- is related to
-
JBPAPP-4927 CLONE -HHH-3334 Cascade-save breaks if parent ID is assigned (delays insert) and child has identity ID (early insert)
- Closed