Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.2
Name and version of the database you are using: mysql 5
i have entity Calendar and many-to-many table CalendarLinkedToCalendar (datatbase generated by external tool, not hibernate!)
im using annotations
i want to map two collections to Calendar object : linkedTo (calendars that this calendar referes) and LinkedFrom (calendars from wich this calendar reffered)
without annotations its simple
Quote:
<set name="linkedToCalendars" table="CalendarLinkedToCalendar" lazy="false">
<key column="idCalendarFK"></key>
<many-to-many class="org.domain.entity.Calendar" column="idCalendarFK_2" />
</set>
<set name="linkedFromCalendars" table="CalendarLinkedToCalendar" lazy="false">
<key column="idCalendarFK_2"></key>
<many-to-many class="org.domain.entity.Calendar" column="idCalendarFK" />
</set>
i need to do the same but with annotations ...
i really dont know how ... help )
p.s. it is possible to specify name of assotiations table (CalendarLinkedToCalendar) with annotations?