-->
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: Cascaded saving
PostPosted: Fri Jan 09, 2004 10:16 am 
Newbie

Joined: Fri Jan 09, 2004 10:11 am
Posts: 1
Hi all;

I'm just into hibernate. My mappings generate smoothly, schemaexport works fine. I linked two tables together with a one-to-many relationship using a Set. Now, the only onnoying problem is that when I try to save the parent object, all the child objects get not saved along.

The mapping:

<set
name="details"
cascade="all"
>

<key
column="order_id"
/>

<one-to-many
class="util.Detail"
/>
</set>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 09, 2004 10:43 am 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
Please show your java code, mapping for the other class (other side of the relationship), preferably formatted in code blocks.

I suspect that you are not updating the object relationships correctly. The reference manual covers this in detail under the section Parent child relationships.

Thanks
Justin


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.