Hello
I am trying to make a query with Hibernate criteria API. It looks simple but I can't get it to work. I have 2 tables. Person and Roles. Person has a set of roles. Role doesn't have any reference to Person. (i.e a guy A can be admin, user, another girl B can be only admin, etc...) I just want to to search for everyone who is doing a certain role. i,e If I select admin, I got both A and B If I select user, I got only A.
I really looked through the internet but found nothing similar. Could someone please point me out in the right direction? Thanks in advance!
Cheers