<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.
|