Mapping Associations using composite-key element ,property-ref attribute and
<formula> element
----------------------------------------------------------------------------------------------
Key: HHH-3844
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3844
Project: Hibernate Core
Issue Type: Improvement
Components: core
Environment: Hibernate 3.2.6.ga
Reporter: Sandeep Vaid
I want, join should be performed on 3 properties out of which 2 are normal properties and
one is part of composite key.
How can i specify these 3 properties inside <properties> tag ?
<class name="Product" table="PRODUCT"
optimistic-lock="version">
<id name="productId" column="PRODUCTID">
<generator class="assigned" />
</id>
<one-to-one name="productBasic" class="ProductBasic"
cascade="save-update" property-ref="activeProduct">
<formula>'001'</formula>
<formula>TIMESTAMP ('9999-12-31 00:00:00.0')</formula>
<formula>PRODUCTID</formula>
</one-to-one>
</class>
<class name="ProductBasic" table="PRODUCTBASIC"
optimistic-lock="version">
<composite-id name="compProductBasicBO"
class="com.tietoenator.lis.db.impl.product.bo.CompProductBasicBO">
<key-property name="productId" column="PRODUCTID"
></key-property>
<key-property name="useType" column="USETYPE"
></key-property>
<key-property name="startTimeStamp" column="STARTTIMESTAMP"
></key-property>
</composite-id>
<properties name="activeProduct">
<!-- <property name="compProductBasicBO.useType"
column="USETYPE" ></property> -->
<property name="endTimeStamp" column="ENDTIMESTAMP"
></property>
<many-to-one name="productBO" class="ProductBO"
column="PRODUCTID" insert="false" update="false"/>
</properties>
</class>
--
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