• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate Criteria addOrder

 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys

Quick question about Hibernate Criteria addOrder.

If you have an Object
ObjectOne which uses an obect within it ObjectTwo which in turn has a varible param1 how in Hib.Criteria can you order by param1.



I tried just doing the following:-



But all return the same error:
org.hibernate.QueryException: could not resolve property: param1 of: com.myproject.ObjectOne

PS: All have the correct tables & hibernate mapping files.
 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PPS...

Also tried

 
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!