Hi
Please find the Image here :
http://ramsateesh.googlepages.com/index.html
I have a persistant object of the parent and I have my mapping file which allows hibernate to create the parentId (primary key). But I have a list of child objects embedded in the parent object which have parentId as their foreign Key. I have cascade all in my parent.hbm.xml file.
When I am doing session.save(parent), I am getting an exception saying that I am trying to insert data into child with parentId value eq null.
I tried to debug the code by removing cascade all from the parent mapping file. Right after a successful save of parent I thought it would update the parentId in the children but it didn't and I think that's the reason why it's failing to insert data when cascade all option was present in the parent mapping file.
Can someone help me solving this problem, what do I have to do so that when I save my parent my child records also get saved.[/img]