HQL

example
final String query &#61; "SELECT u.id as user_id, u.createdApplicationId as created_application_id, g.id as group_id, g.name as group_name, " + "g.description as group_description, r.value as role_value " + "FROM User u, Identifier i \n" + "JOIN u.groups g \n " + "JOIN g.roles r \n" + "WHERE i.identifier &#61; &#58;identifier AND g.applicationId &#61; &#58;applicationId AND i.user &#61; u.id ";
 * implied joins

List results &#61; getHibernateTemplate.findByNamedParam(query, new String[]{"applicationId", "identifier"},               new Object[]{applicationId, identifier}); select user0_.id as col_0_0_, user0_.created_application_id as col_1_0_, group3_.id as col_2_0_, group3_.name as col_3_0_, group3_.description as col_4_0_, role5_.value as col_5_0_ from User user0_ inner join user_group groups2_ on user0_.id=groups2_.user_id inner join ace_group group3_ on groups2_.group_id=group3_.id inner join group_role roles4_ on group3_.id=roles4_.group_id inner join Role role5_ on roles4_.role_id=role5_.id cross join Identifier identifier1_ where identifier1_.identifier=? and group3_.application_id=? and identifier1_.user_id=user0_.id
 * produces