-->
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.  [ 1 post ] 
Author Message
 Post subject: Cascade-all missing from some examples
PostPosted: Sun Aug 23, 2009 9:06 pm 
Newbie

Joined: Sun Aug 23, 2009 8:41 pm
Posts: 1
I've been working from some examples on bidirectional mapping, but I couldn't work out when the children of some objects were not being saved.

http://docs.jboss.org/hibernate/stable/core/reference/en/html/collections.html#collections-bidirectional

Take for example section 6.3.3

Quote:
<class name="Parent">
<id name="id" column="parent_id"/>
....
<map name="children" inverse="true">
<key column="parent_id"/>
<map-key column="name"
type="string"/>
<one-to-many class="Child"/>
</map>
</class>


Is the cascade-all keyword required if I want the children to be saved? In my case I have to use cascade-all for bidirectional maps yet I don't need it for similarly configured bidirectional sets.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.