]
Steve Ebersole closed HHH-760.
------------------------------
Closing stale resolved issues
Cannot use formula element in a many-to-one mapping in a
composite-key for a set
--------------------------------------------------------------------------------
Key: HHH-760
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-760
Project: Hibernate Core
Issue Type: Patch
Components: core
Affects Versions: 3.0.5
Environment: Hibernate 3.0.5, SQL Server
Reporter: David Good
Attachments: Set.java, StringHelper.java
A mapping of the following type:
<set name="addresses" table="addrlink"
cascade="all">
<key column="alnk_oguid"/>
<composite-element class="AddressLink">
<property name="default" column="alnkdeflt"/>
<many-to-one name="addressType" cascade="none">
<formula>'AT'</formula>
<column name="alnktype"
not-null="true"></column>
</many-to-one>
<many-to-one name="address" column="alnk_addrguid"
cascade="all"/>
</composite-element>
</set>
results in a ClassCastException at saveOrUpdate as the formula element is not handled by
the Set class, which expects a column element.
The attached files resolve this issue in v3.0.5.
I apologise that I am at present unable to generate CVS diffs.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: