If my query contains one class, like:
query = session.createQuery("select u from User as u");
queryResult = query.list();
then I iterate it, where queryResult
is an object of User
class.
So how to get result from query which contains more than one class? For example:
select u, g from User as u, Group as g where u.groupId = g.groupId and g.groupId = 1