I have this query in hql:
String lHql = " from Grupo g"
+ " join g.Persona p "
+ " join g.Animal a "
+ " where g.tipo= "A"";
Query lQuery = pSession.createQuery(lHql);
Object lResult = (Object) lQuery.uniqueResult();
The problem is that it returns 3 different objects (Group, Person and Animal). If you only return Group, assign the result to a Group object and you're done. It does not let me assign the result to an Arraylist, I can only assign it to the generic class Object. By debugging it is clear that the variable LResult has 3 objects inside, each with its attributes. The problem is that I do not know how to go find those objects and pick them up, it does not leave me because lResult is not an array. Thanks