-->
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.  [ 6 posts ] 
Author Message
 Post subject: Hibernate is trying to set the FK to NULL
PostPosted: Mon Aug 09, 2004 4:11 pm 
Newbie

Joined: Mon Aug 09, 2004 2:50 pm
Posts: 10
Location: Sao Paulo , SP, Brazil
Hi,

I


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 6:44 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
http://www.hibernate.org/hib_docs/reference/en/html/collections.html#collections-onetomany
Very Important Note: If the <key> column of a <one-to-many> association is declared NOT NULL, Hibernate may cause constraint violations when it creates or updates the association. To prevent this problem, you must use a bidirectional association with the many valued end (the set or bag) marked as inverse="true". See the discussion of bidirectional associations later in this chapter.

_________________
Leonid Shlyapnikov


Top
 Profile  
 
 Post subject: Why Hibernate don
PostPosted: Thu Aug 19, 2004 5:54 pm 
Newbie

Joined: Mon Aug 09, 2004 2:50 pm
Posts: 10
Location: Sao Paulo , SP, Brazil
Sorry, but I didn


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 20, 2004 4:06 am 
Regular
Regular

Joined: Wed Aug 18, 2004 5:16 am
Posts: 69
Location: Modena, Italy
Have you tried to use cascade="all-delete-orphan"?


Top
 Profile  
 
 Post subject: Re: Why Hibernate don
PostPosted: Fri Aug 20, 2004 4:30 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
stateri wrote:
Sorry, but I didn

_________________
Leonid Shlyapnikov


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 20, 2004 4:38 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
Looked into JBoss CMP docs:
Quote:
Support for not-null columns has been added.

_________________
Leonid Shlyapnikov


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.