[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3654) A bug on set with composite element deletes the elements first instead of updating

leela (JIRA) noreply at atlassian.com
Fri Dec 12 14:18:38 EST 2008


A bug on set with composite element deletes the elements first instead of updating
----------------------------------------------------------------------------------

                 Key: HHH-3654
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3654
             Project: Hibernate Core
          Issue Type: Bug
            Reporter: leela


<set name="pictureCollection"
     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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list