-->
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 with not null constraint without bidirectional
PostPosted: Fri Feb 20, 2004 6:04 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
Hi,

When I design my object model I try to avoid bidirectional associations. When our db guy design his database model he puts not-null constraints on foreign keys.
I see in the doc that there is a limitation with this kind of stuff. I can't use an unidirectional one-to-many link if there is a not-null constraint on the <key> element (in the reference doc).
I want to know if this is a structural problem that can't be avoided or if this is something that may be bypassed by any way or if this is a limitation that will be remove in the future


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 20, 2004 6:51 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
It depends if you have to keep your java model in sync (ie remove the child from the collection).
But session.delete(child); should not violate the constrains by itself

_________________
Emmanuel


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.