[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4825) mapping order impacting behavior leading to bug
Anthony Patricio (JIRA)
noreply at atlassian.com
Thu Jan 21 05:14:29 EST 2010
mapping order impacting behavior leading to bug
-----------------------------------------------
Key: HHH-4825
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4825
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Reporter: Anthony Patricio
Following mapping fails:
<hibernate-mapping default-access="property" package="case419703">
<class abstract="false" dynamic-insert="true" dynamic-update="true" name="TestB"
table="TEST_B">
<composite-id class="case419703.key.FrameworkKeyCustID"
name="frameworkKey">
<key-property column="NR_RZBK" name="frameworkCustId"/>
<key-property column="TXT_OID" name="frameworkOid"/>
</composite-id>
<version column="NR_VERSION" name="frameworkVersion"/>
<set cascade="persist, merge, save-update" inverse="true" lazy="true" name="testC">
<key>
<column name="NR_RZBK"/>
<column name="TXT_OID_TESTB"/>
</key>
<one-to-many class="TestC"/>
</set>
</class>
<class abstract="true" dynamic-insert="true" dynamic-update="true" name="AbstractTestC"
table="notable">
<composite-id class="case419703.key.FrameworkKeyCustID"
name="frameworkKey">
<key-property column="NR_RZBK" name="frameworkCustId"/>
<key-property column="TXT_OID" name="frameworkOid"/>
</composite-id>
<version column="NR_VERSION" name="frameworkVersion"/>
<union-subclass dynamic-insert="true" dynamic-update="true" name="case419703.TestC"
table="TEST_C">
<property column="PID" name="pid" update="false"/>
<property column="TXT_OID_TESTB" name="fkReverseTestB"/>
<many-to-one cascade="persist, merge, save-update" class="case419703.TestB"
fetch="select" insert="false" lazy="no-proxy" name="reverseTestB"
update="false" >
<column name="NR_RZBK" />
<column name="TXT_OID_TESTB" />
<!-- formula>'TXT_OID_TESTB'</formula-->
</many-to-one>
</union-subclass>
</class>
</hibernate-mapping>
however changing to
<many-to-one cascade="persist, merge, save-update" class="case419703.TestB"
fetch="select" insert="false" lazy="no-proxy" name="reverseTestB"
update="false" >
<column name="NR_RZBK" />
<column name="TXT_OID_TESTB" />
<!-- formula>'TXT_OID_TESTB'</formula-->
</many-to-one>
<property column="PID" name="pid" update="false"/>
<property column="TXT_OID_TESTB" name="fkReverseTestB"/>
works.
Something is wrong with th algo.
See attached testcase.
--
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