
Originally Posted by
miroconnect@yahoo.com
I have parent and child with cascade all . In my case I open session, load the parent create a new child (this is transient) and add this child to parent and call save , I was hoping that hibernate would generate the PK for the newly added child , but it did not , it is generating only after flush ,and I if I want to use the PK of this child for some other operation before flush I canot , I want hibernate to generate the PK of the child with call to save on persistant parent , please tell me how to do this ?