JPA2 + Hibernate + Order By
- by Jan
Hi.
Is it possible (using Hibernate and JPA2 Criteria Builder [1]) to order by a method's result rather than an entity's member?
public class X {
protected X() {}
public String member;
public String getEvaluatedValue() { // order by
return "some text " + member;
}
}
What I want to achive is order by the result of getEvaluatedValue(). Is that possible?
Thanks in advanced.
[1] http://docs.jboss.org/hibernate/entitymanager/3.5/reference/en/html_single/#querycriteria