-->
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.  [ 5 posts ] 
Author Message
 Post subject: cascading parent and child
PostPosted: Tue Sep 14, 2010 7:19 am 
Newbie

Joined: Fri Aug 06, 2010 12:03 pm
Posts: 4
HI,

I am using one-to-many mapping for parent and child relationship..and using cascade="all"..
It is trying to insert the child before parents'...the child should get inserted only after the parent's insertion....any option in hibernate to avoid this....

Thanks!!!!!!


Top
 Profile  
 
 Post subject: Re: cascading parent and child
PostPosted: Tue Sep 14, 2010 8:18 am 
Regular
Regular

Joined: Fri Aug 06, 2010 1:49 am
Posts: 102
Location: shynate26@gmail.com
1 -< m
1 is parent
m is child ?

_________________

Cheers!
Shynate
mailto:shynate26@gmail.com
www.CSSCORP.com


Top
 Profile  
 
 Post subject: Re: cascading parent and child
PostPosted: Tue Sep 14, 2010 8:24 am 
Newbie

Joined: Fri Aug 06, 2010 12:03 pm
Posts: 4
yes..1 is parent and m is child...


Top
 Profile  
 
 Post subject: Re: cascading parent and child
PostPosted: Tue Sep 14, 2010 8:30 am 
Regular
Regular

Joined: Fri Aug 06, 2010 1:49 am
Posts: 102
Location: shynate26@gmail.com
viewtopic.php?f=1&t=1006939

see my reply here, hope this is ur problem

_________________

Cheers!
Shynate
mailto:shynate26@gmail.com
www.CSSCORP.com


Top
 Profile  
 
 Post subject: Re: cascading parent and child
PostPosted: Tue Sep 14, 2010 9:02 am 
Newbie

Joined: Fri Aug 06, 2010 12:03 pm
Posts: 4
Hi,

I went through the URL given....

as I am implementing it in the mapping file...i am looking for options of type cascase="all"..
while doing one-to-many mapping...
Code:
<set name="Company"  inverse="true" cascade="all" lazy="false" >
         <key column="emp_id" />
         <one-to-many class="Employee"/>
      </set>


Thanks!!!!!!!!


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