• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate Criteria and composite key

 
Ayyappan Selvaraj
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!