[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4825?page=c...
]
Strong Liu resolved HHH-4825.
-----------------------------
Resolution: Fixed
Fix Version/s: 3.5.0-CR-2
3.3.x
patch applied, I picked option 2 in my previously comment in that patch.
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, 3.5.0-Beta-3
Reporter: Anthony Patricio
Assignee: Strong Liu
Fix For: 3.3.x, 3.5.0-CR-2
Attachments: hhh-4825.patch
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira