wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Hibernate Criteria and composite key 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 "Hibernate Criteria and composite key" Watch "Hibernate Criteria and composite key" New topic
Author

Hibernate Criteria and composite key

Ayyappan Selvaraj
Ranch Hand

Joined: Sep 20, 2004
Posts: 63
I have a hbm mapped bean with a composite key as id and the composite key is constructed using another class, a foriegn key and a column of String datatype. The mapped java class gets the id as the composite key by extending another class.

Now i want to create Criteria object based on the composite key. how can it be done?
Urgent suggestions required please..

my hbm file:


Im getting error here.. it tells that there is no such property in the EntityAlternateId class.. SO please suggest what shud be done..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate Criteria and composite key
 
Similar Threads
one-to-many mapping with table having no primay key
Hbm2JavaTask won't generate composite user types correctly
hbm.xml file does an update instead of an insert- Helppppp
Hibernate - Legacy Database Question
composite key in annotations