Hello,
a Person has a Company (id, name...)
The person mapping has a many-to-one with company (joined by id)
I'm using detached criteria and I do Order.asc("companyInfo.name")
(all the variable names and such are legit and working)
I have tried this on variables that are in the mapping, but not in a join (blah.foo) and they work well, but for the joined class, this has not worked at all.
I get:
Code:
org.hibernate.QueryException: could not resolve property: companyInfo.name of: blah.blah.Person
[/code]
I would permanently set this in the mapping, but it needs to change from ascending to descending (and has pagination so I just can't retrieve all and order then...). Is this possible?