fggarcia wrote:
Person_Group is not mapped to a class, because I'm using Collections to hold the relationship, but I cant't map the is_leader column. Now I need querys like "the leaders for a group" or "which groups lead a person"
Do I need map person_group table with a class? or it's possible do that queries without extra mapping?
You definitely need to map third table (the association table person_group) to retrieve data present in person_group table.
Add one to many relation in Person table to person_group table
and in personGroup.hbm create many to one relation with group table
like
person.personGroups.groupDetails
person=original person class
personGroups = Set of person_group table
groupDetails = Object of original group class