Beginner |
|
Joined: Fri Feb 27, 2004 11:47 am Posts: 24
|
Is this association right
<hibernate-mapping>
<class table="TEST_ASSOCIATION" name="abcl.TEST_ASSOCIATION">
<id unsaved-value="0" name="ID">
<generator class="native"/>
</id>
<bag name="D_FACILITY" cascade="none" inverse="true" outer-join="false" batch-size="1">
<key column="TEST_ID"/>
<many-to-many class="abc.D_FACILITY" />
</bag>
</class>
</hibernate-mapping>
with
<hibernate-mapping>
<class table="D_FACILITY" name="model.D_FACILITY">
<id unsaved-value="0" name="ID">
<generator class="native"/>
</id>
<many-to-one name="TEST_ASSOCIATION" property-ref="PARENT_FACILITY_ID" column="FACILITY_ID"/>
</class>
</hibernate-mapping>
PARENT_FACILITY_ID is not the primary key in TEST_ASSOCIATION
and FACILITY_ID is same as PARENT_FACILITY_ID in D_FACILITY table
I have tried everything associated with Many - to - One it's not working,
Is there any problem in association
_________________ Web Developer
|
|