I try to generate a HQL query that include user with a empty appoinment collections(mapped by OneToMany):
SELECT u FROM User u JOIN u.appointments uas WHERE
// Hibernate query: const string hql = "from User u where u.Id = 101 and size(u.Appointments) = 0";