Exactly right.
You should really consider reading the relevant section of the (easy to read) manual since it is the FIRST question everyone asks when using Hibernate - not a dig, but really, it would save you time!
You are correct though.
Code:
Role {
Long id;
Set <Participant> participents; // not that you need Set and NOT HashSet (as H8 replaces them at runtime)
// getters & setters
}
Participent {
Long id;
Role role;
}
Then a Set is a good way to model this in the mappings.
If you model it as a lazy association, your hql would be
Code:
from Role fetch participants
Once you've done this, if it doesn't work, post your mappings, java files and error stack trace and people will offer very detailed help.