[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3844) Mapping Associations using composite-key element ,property-ref attribute and <formula> element
Sandeep Vaid (JIRA)
noreply at atlassian.com
Wed Apr 1 10:15:38 EDT 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32764#action_32764 ]
Sandeep Vaid commented on HHH-3844:
-----------------------------------
The problem is with useType mapping.
org.hibernate.PropertyNotFoundException: Could not find a getter for compProductBasicBO.useType in class com.tietoenator.lis.db.impl.product.bo.ProductBasicBO
at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:282)
at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)
> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list