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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.