many to many relationship query in hibernate code example Example: hibernate query many to many from Portailuser u join u.portailroles r where r.name=:roleName