I've searched the FAQ's and the documentation and the Tutorials, so this is a last resort for me. So, now that you know I've tried to find my solution, here is my problem. :)

For objects, I have a user, which has a contact object, which in turn has an address object. All mapped as one-to-one objects. Now, when I create a user, it assigns them all the same unique ID. Great!! This is exactly what I want.

Now. I have another object, Pilot, which includes a user object and is mapped as a one-to-one to user. So, I do something like this. pilot.setUser(user); And then I save the user.(I get the same result by saving the Pilot object). A new pilot, contact and address is created, but not a new user. So, my one-to-one relationship is broke in my database, my pilot Id column is wrong and I have an extra contact and address row. Any thoughts on what i could possibly be doing wrong? I want the new Pilot object to take the same ID as the user object, just as the one-to-one mapping should do.

Any help would be appreciated.

Thanks.

James



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to