[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2910) entity version increased after merging Map

kyrieeleison (JIRA) noreply at atlassian.com
Thu Oct 25 01:05:39 EDT 2007


entity version increased after merging Map
------------------------------------------

                 Key: HHH-2910
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2910
             Project: Hibernate3
          Issue Type: Bug
          Components: core
    Affects Versions: 3.2.5
         Environment: core 3.2.5,  entity manager 3.3.1
            Reporter: kyrieeleison



EntityB extends abstract EntityA by primary key join

EntityC has a composite key, which are "mapColumn" and "joinColumn"

EntityB, EntityC has a one-to-many, manty-to-one bid relationship,   


For EntityA:
               <inheritance strategy="JOINED"/>
               <id name="joinColumn"/>

For EntityB:
          <!-- primary key join EntityA -->
          <primary-key-join-column name="joinColumn" referenced-column-name="joinColumn" />
         
          <!-- one to many Map -->
	  <one-to-many fetch="EAGER" name="entityCes" target-entity="EntityC" mapped-by="entityB">
                        <map-key name="mapColumn"/>
                        <join-column name="joinColumn"/>
			<cascade>
			      <cascade-all/>
                       </cascade>
            </one-to-many>

For EntityC:
                <!-- composite id -->
                <id name="joinColumn"/>
		<id name="mapColumn"/>

                <!-- many to one EntityB -->
 		<many-to-one name="entityB" target-entity="EntityB">
		       <join-column name="joinColumn" insertable="false" updatable="false"/>
		</many-to-one>


Merge EntityB again and again without changing any properties, its version number get increased

If change the one-to-many to Set , not Map,  its version number stay unchanged as expected

Is that a desired behavior?

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