-->
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.  [ 1 post ] 
Author Message
 Post subject: set with composite-ele deletes elems first instead of update
PostPosted: Fri Dec 12, 2008 3:27 pm 
Newbie

Joined: Tue Nov 25, 2008 5:10 pm
Posts: 4
<set name="aCollection"
lazy="true"
access="field"
cascade="save-update"
outer-join="false"
table="tablec">
<key column="aid" />
<composite-element class="tablec">
<many-to-one name="b" column="bid" lazy="proxy" access="field" not-null="true" />
<property name="x" type="int" access="field"/>
<property name="seqno" type="int" access="field"/>
</composite-element>
</set>

I am trying to delete the first entry and then update the seqno accordingly for the remaining entries.

when the commit is done, hibernate performs delete operation followed by insert for the remaining entries in the collection, instead of updating the dirty objects.

delete from tablec where aid=? and bid=?

insert into tablec (aid, bid, x, seqno) values (?, ?, ?, ?)

Is not this a bug? If we have 1000 objects in the collection, would not this cause a big performace impact?

Please help me on this.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.