Hi !, I'm trying to do a many-to-many association :
On my User.hbm.xml I have :
Code:
<set
name="groups"
table="UG"
lazy="true"
inverse="false"
cascade="all"
sort="unsorted"
>
<key
column="user_id"
>
</key>
<many-to-many
class="aston.hibernate.objets.Group"
outer-join="auto"
/>
</set>
On my Group.hbm.xml I have :
Code:
<set
name="users"
table="UG"
lazy="true"
inverse="true"
cascade="all"
sort="unsorted"
>
<key
column="group_id"
>
</key>
<many-to-many
class="aston.hibernate.objets.User"
outer-join="auto"
/>
</set>
These are generated by Xdoclet.
But the schemaexport tool produce :
Code:
create table UG (
user_id BIGINT not null,
elt BIGINT not null,
group_id BIGINT not null,
primary key (group_id, elt)
)
and so when I'm trying to use it, it doesn't work !
Anybody could help me ?