Hibernate version: 3.2
Name and version of the database you are using: Oracle 10g
I have the following classes with properly mapped HBM files:
Code:
public class Workbench {
Long id;
Tool tool;
public Tool getTool();
}
public class Tool {
Long id;
String name;
public String getName();
}
If I try to do the following in code:
DetachedCriteria criteria = DetachedCriteria.forClass(Workbench.class)
.addOrder( Property.forName("tool.name").asc() );
I get the following error:
HibernateQueryException: could not resolve property: tool.name
Is this a limitation of Hibernate, in that you can't sort on a joined record using Criteria? It seems to work ok with HQL.