Joined: Tue May 23, 2006 7:47 am Posts: 1
|
I try to visualize the mapping described below. The inheritance relationship between "DaemonAccount "and "RealPerson" to the base class "BasicUser" gets visualized by the Hibernate Entity Model view and I can also see the entity "Group". But the many-to-many relationship between "Group" and "BasicUser" is not shown as a (bi-directional) link. Am I missing something or is a workaround required? Do I have to resolve the relation as two many-to-one relations in order to see the association?
Hibernate version: 3.1.0 beta5
Mapping documents:
<class name="mail.BasicUser" discriminator-value="Bu">
<id name="id" column="userId">
<generator class="identity"/>
</id>
<discriminator type="string"/>
<property name="uid" unique="true" not-null="true"/>
<property name="uidNumber" unique="true" not-null="true"/>
<set name="groups" table="User_Group" cascade="all-delete-orphan">
<key column="USER_ID"/>
<many-to-many column="GROUP_ID" class="mail.Group"/>
</set>
<subclass name="mail.RealPerson" discriminator-value="BuRp">
<property name="cname"/>
</subclass>
<subclass name="mail.DaemonAccount" discriminator-value="BuDa">
<property name="purpose"/>
</subclass>
</class>
<class name="mail.Group">
<id name="id" column="groupId">
<generator class="identity"/>
</id>
<property name="gid" unique="true" not-null="true"/>
<property name="gidNumber" unique="true" not-null="true"/>
<set name="members" table="User_Group" inverse="true" cascade="all-delete-orphan">
<key column="GROUP_ID"/>
<many-to-many column="USER_ID" class="mail.BasicUser"/>
</set>
</class>
Name and version of the database you are using: IBM db2 8.1
_________________ Those who can, do
Those who cannot, teach
(i) Those, who cannot teach, lecture trainee teachers teaching methodology
(ii) Those who cannot teach, administer
|
|