File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Mapping Associations using composite-key element ,property-ref attribute and <formula> element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Mapping Associations using composite-key element ,property-ref attribute and <formula> element" Watch "Mapping Associations using composite-key element ,property-ref attribute and <formula> element" New topic
Author

Mapping Associations using composite-key element ,property-ref attribute and <formula> element

Sandeep Vaid
Ranch Hand

Joined: Feb 27, 2006
Posts: 390
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 ?

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)




Sandeep Vaid
Ranch Hand

Joined: Feb 27, 2006
Posts: 390
If i don't use seperate class for composite-id, then it is working fine :

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mapping Associations using composite-key element ,property-ref attribute and <formula> element
 
Similar Threads
"Left join Fetch" "With Clause" Required
one-to-one with property-ref always non-lazy
One-to-one:property-ref to a part of composite-key
Critial Problem with one-to-one association.
Hibernate: one-to-one composite foreign key : Strange Scenario