I have a model where three tables are related two levels of two-many relationships.
member <to-many> recipient <to-many> event
These are garden variety to-many relationships based on a foreign key of the parent in the child, and I have a working mapping of this in hibernate.
Member.getRecipients():Set
Recipient.getEvents():Set
Does hibernate provide a facility to map a lazy collection of Events directly into the Member?
I can obviously provide a cover method in Member to iterate the recipients, and collect the list of events to return. I can also use HQL or SQL, but I'm interested in knowing whether there's a suitable way of doing this purely in the mapping.
- Ken
|