Joined: Mon Jul 12, 2004 7:31 pm Posts: 3
|
Hi,
I have a many-to-one association between two objects A & B.
A has a reference to B. & I have declared a many-to-one relationship on the property of A that refers to B. cascade is set to true.
When I do a save the insert for B is done before the insert for A. Is there a way to force A to be saved first? This is important because the primary key of A that is generated through a sequence is used as a foreign key in B.
I do not want to change my object structure and make B have a reference to A to achieve this. Would anyone know of a way to do this through hibernate mapping?
Thanks
Pratima
|
|