-->
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: Hibernate merge help
PostPosted: Sun May 27, 2007 10:02 pm 
Newbie

Joined: Tue May 01, 2007 12:25 pm
Posts: 5
hi all,

Please consider the follwoing example
https://glassfish.dev.java.net/javaee5/ ... ample.html

In my scenario consider this onetomany relationship as UniDirectional.

The problem is when i update the customer by removing an order,the entity manger MERGE removes only the link but not the entier row realted that order.i.e., removes the CUSTOMER_ID from the ORDER_TABLE,not the entire row.

For this whether i have use Entity manger.remove while updating???

Is anyone faced the same problem???

regards,
sathish


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 27, 2007 11:39 pm 
Senior
Senior

Joined: Sat Aug 19, 2006 6:31 pm
Posts: 139
If you want the entire row on the order table deleted you need to specify cascade for delete orphan.

Here are some info about it.
http://www.hibernate.org/hib_docs/annot ... ec-cascade
http://www.hibernate.org/hib_docs/entit ... transitive

_________________
Don't forget to rate the reply if it helps..:)

Budyanto


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.