-->
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: Insert an element into a list (not appending)
PostPosted: Fri May 27, 2005 8:07 am 
Newbie

Joined: Wed May 04, 2005 6:26 am
Posts: 3
Hi, when I try to insert a new element into an existing list and then try to update my list, I get an exception: java.sql.BatchUpdateException: Cannot add or update a child row: a foreign key constraint fails

getItem().getSection().getItems().add(getInsertPosition(),getItem());
getSectionDao().saveOrUpdateSection(getItem().getSection());

What should I do about it?

Regards,
BV


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 27, 2005 9:52 am 
Regular
Regular

Joined: Tue May 24, 2005 10:19 am
Posts: 65
try this
http://www.hibernate.org/116.html#A6
Read documentation
In next post, put more info!


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.