sgwood wrote:
Why do you want the id before you save? If it is because you want to put the id in another table/object, you don't need the id, as you can work with Hibernate to do the updating in the right order.
Sherman
yes, I need it for that reason. I hava an object with ID1, and it contains another object, which ID is composed of parent object's ID1 and another number.
the problem is, that I didn't map that complex object in hibernate, but I mapped the plain properties of parent object, and then i mapped the properties of the child object. and if I want to save the parent object, I simply manually save the child, and than the parent
Should I add mapping of child object to the parent object? I'm not sure, It will work....