Hi there,
I have two classes in java that have a relation of many-to-many. These two classes correspond to two tables in a MySQL database and I'm using what I regard as a join table that keeps pairs of the primary keys of these tables:
create join_table( int tableone,
int tabletwo,
foreign key stuff,
primary key(tableone,tabletwo);
Thing is that I follow the example from the hibernate documentation (section 7.5.3 many to many) but it keeps reporting :
Association references unmapped class
The names of these tables are RegistreEvents and DadesPersonals and EventsComunicats as the join table. The following is the stuff I added to RegistreEvents and DadesPersonals mapping files:
RegistreEvents:
<set name="toWhom" table="EventsComunicats">
<key column="eventId" />
<many-to-many column="toPersona" class="DadesPersonals" />
</set>
DadesPersonals:
<set name="repEvent" table="EventsComunicats" inverse="true">
<key column="toPersona" />
<many-to-many column="eventId" class="RegistreEvents" />
</set>
Helping to understand me:
name = class attribute
key column = join table attribute
many-to-many column = join table attribute
Does anyone know what is what I'm doing wrong?
Many thanks to all of you in advance,
Blai[/u]
_________________ Veles e vents han mos desig complir faent camins dubtosos per la mar.
|