Reputation: 478
I have this query that I need in HQL, but I have found very little help online.
select first_name, last_name, group_id, group_name, status
from users
join groups on groups.id = users.group_id
What would this be if converted to HQL?
Upvotes: 0
Views: 588
Reputation: 424983
Making a few assumptions:
select u.first_name, u.last_name, u.group.id, u.group.group_name, u.group.status
from users u
Basically the join is done for you. You just reference other objects in the object graph using dot notation.
Upvotes: 1