-->
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.  [ 3 posts ] 
Author Message
 Post subject: Confilcting settings do not allow the desired setup
PostPosted: Tue Nov 25, 2003 3:45 pm 
Beginner
Beginner

Joined: Tue Nov 25, 2003 3:33 pm
Posts: 35
I have a list one-to-many collection and this is what's bugging me:

So I have my parent that has the following settings:
<list name="children" lazy="true" inverse="true" cascade="all-delete-orphan">
<key column="parent_id" />
<index column="child_no" />
<one-to-many class="model.Child0" />
</list>

with this setting the child_no column is not updated if I set inverse=false the child_no will be updated correctly but then all-delete-orphan is messed up. (delete will not happen)

How do I resolve this?

Thanks,
Alex.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 26, 2003 10:04 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
For inverse="true", read http://www.hibernate.org/Documentation/InsideExplanationOfInverseTrue

For all-delete-orphan, you have to be more precise.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 26, 2003 10:18 am 
Beginner
Beginner

Joined: Tue Nov 25, 2003 3:33 pm
Posts: 35
Actually I figured that it is not a supported feature.

Basically, I have an uderstanding of what inverse does. The reason I needed this is explained in my other topic that I posted later that day.

In short, if you need indecies of your list updated automagically you need inverse="false" otherwise hibernate will take whatever you have in your many side of the relation. Now, inverse="false" makes all-delete-orphan not fired. I would call it a bug, because semantically this possibility makes sense, but gavin calls it an usupported feature :-) I will leave it at that.

thanks,
Alex.


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