Hi All,
This is related to persistence of parent and child objects, where the child object shares the primary key with its parent's primary key. When I am trying to save the parent along with children, it throws exception saying, the child should populate the primary key id, but I cannot populate since it parent is still not created and get created along with child.
If I save parent and then save child separtly, it goes fine otherwise no.
Also, I heard this attribute named "constrained" and "generator=forign" but not sure whether they gonna help me.
You suggestions are highly appreciated.
Thanks,
Arshad
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: