-->
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: one-to-many question
PostPosted: Mon Jan 24, 2005 12:47 pm 
Newbie

Joined: Mon Jan 24, 2005 12:33 pm
Posts: 1
I have a one-to-many relationship between two classes.

I first create a object of the parent class and the populate the children set.
But when I try to persist the parent class I get a error message which says that the foreign key column in the children class cannot be null.

This issue is mentioned in the Hibernate documentation and I have tried to follow these guidelines without success.

What behavior should I expect from Hibernate ?

Is it not correct that it should be enough to persist the parent object only ?

I use a recent MySql database and the Hibernate template in the Spring framework.

Have there been any bugs reported/fixed one this issue recently?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 24, 2005 12:50 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Please follow the parent/child example chapter from the reference documentation step by step, without exception. There are no bugs in this.


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.