Hi
I want to split up a many-to-many assosiation, and I've got the impression that the recommended way to do this is like the mapping I've pasted under "Mapping documents". Anyone know of any complete examples doing it this way? I want do be able to use lazy loading, and it to be bidirectional. What I can't understand is this: How do I in this example map the Employee, so that I can fetch the Meetings he/she attends? Not only the entries in EmployeeMeeting. And to make this bidirectional, can I just do the same kind of mapping for Meeting, so that I can fetch all the Employees attending a meeting. Or is it a better way to make this bidirectional?
Hibernate version: 2.1.2
Mapping documents:
(taken from:
http://adigio.com/blogs/christian/archives/2004/09/hibernate_manyt.html)
Employee:
<one-to-many
class="foo.bar.EmployeeMeeting"/>
Meeting:
<one-to-many
class="foo.bar.EmployeeMeeting"/>
EmployeeMeeting:
<many-to-one
class="foo.bar.Employee/>
<many-to-one
class="foo.bar.Meeting/>
Any ideas or hints?
Thanks,
Kristian