Link to home
Start Free TrialLog in
Avatar of bhomass
bhomass

asked on

join using hibernate hql

this is a hibernate question.

I am not able to find sample hql for doing join involving two tables.

table item has a (int) userid, which refers to user table. there is a name attribute in the user table.

I want to do a sorted collection query, in the ascending order of user.name.

the equivalent sql would be
SELECT * FROM item INNER JOIN user ON item.userid=user.userid ORDER BY user.`name`

please help me with the corresponding hql.
ASKER CERTIFIED SOLUTION
Avatar of 3lIOns
3lIOns
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial