views:

10

answers:

0

I've been able to successfully do this with Hibernate3, but cannot find the corresponding syntax in Hibernate2, and am wondering if it's even possible.

Criteria crit = session.createCriteria(User.class).
  createAlias("organization", "organization").
  addOrder(Order.asc("name"));

Hibernate2 doesn't support FetchMode.JOIN, and the above code yields the following exception:

could not resolve property: organization.name of: com.test.User

Is this sort of ordering logic even available in Hibernate2?