-->
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: Question on updating a collection of embedded entities
PostPosted: Tue Oct 07, 2008 5:43 am 
Newbie

Joined: Fri Sep 26, 2008 10:48 am
Posts: 10
Hello!

I have a Customer object which contains a unidirectional collection (Set) of ContactPersons (embedded entities).

Cascading for this relation is set to "all,delete-orphans". It works correctly but what I'm wondering about is why Hibernate entirely deletes and re-inserts the ContactPersons every time I update the Customer.

The object graph is in detached state as I get it from a remote client.

I have implemented equals() and hashCode() according to the recommendations of the Hibernate documentation.

I'd appreciate any help.

Best regards,

Fabian


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 07, 2008 5:48 am 
Newbie

Joined: Fri Sep 26, 2008 10:48 am
Posts: 10
I forgot to mention that I'm using the convenience update() method of Spring's HibernateTemplate.


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.