I have a class
public class Human{
@OneToMany
private List<Pets> myPets;
//other fields here.
}
Is is it possible to query the human class and get the human with the most number of pets? can Hibernate/HQL do this or do I have to manualy get all humans and query list of pets they contain?? if so how?