-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: primary key not getting set on cascaded object
PostPosted: Fri Sep 23, 2005 12:21 am 
Newbie

Joined: Fri Dec 17, 2004 12:54 pm
Posts: 13
Hi,
I have a parent object that has a list that references another mapped object. the cascade attribute is set to all and when I load the parent object, add a new child to its list and run session.save hibernate will save the child object but for some reason it does not set the primary key on the child. Its sets all other properties. I'm using Mysql and using increment for a primary key gen. Has anyone seen this before?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 23, 2005 3:13 am 
Beginner
Beginner

Joined: Tue Sep 20, 2005 4:32 am
Posts: 29
Location: Cluj-Napoca
Do you set the parent for the child before saving ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.