I've created an Object A {id: long (AutIncrement), name:String} , which I'll saveOrupdate with hibernate.
I want to know, before A being save, which will be the generated Id. I need it , because I need to set properties in A that depends on properties of an object B, but I've also properties in B depending on object A.
It's kind of a circular dependency. When filling B I need the id of A, when filling A, I need one generated property of B.
Is there a way to know prior to save A, which will its ID.
Thanks in advance rgd