-->
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.  [ 3 posts ] 
Author Message
 Post subject: set of composite elements
PostPosted: Mon Oct 24, 2005 2:47 am 
Newbie

Joined: Thu Apr 14, 2005 3:28 am
Posts: 7
Location: Moscow, Russia
Hi,

I have mapping:

some entity -> component -> set of composite-elements

When I reattach entity to the session collection updates every time, even if collection does not modified...

Can I achieve such behaviour when entity to be updated when I pass it to the session.save() explicitly?

Thanks...


Top
 Profile  
 
 Post subject: Re: set of composite elements
PostPosted: Mon Oct 24, 2005 12:00 pm 
Newbie

Joined: Thu Jul 07, 2005 8:10 am
Posts: 6
Location: St. Louis, MO
crane wrote:
Hi,

I have mapping:

some entity -> component -> set of composite-elements

When I reattach entity to the session collection updates every time, even if collection does not modified...

Can I achieve such behaviour when entity to be updated when I pass it to the session.save() explicitly?

Thanks...


Make sure equals and hashcode are properly implemented in your component and composite elements. If equals() returns false, Hibernate thinks the object is dirty and thus tries to update it.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 25, 2005 5:02 am 
Newbie

Joined: Thu Apr 14, 2005 3:28 am
Posts: 7
Location: Moscow, Russia
Tnanks a lot...


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