posted 16 years ago
Actually, I am facing a Mapping issue with one-to-many association on a foreign key. Requesting Help.
In Table ACTIVITY, BUSNS_ACTVY_ID is the PK.
In Table ACTIVITY_SERVICE_ATTRIBUTE, SRVC_ATTRIB_BUSNS_ACTVY_ID is the FK, referring to BUSNS_ACTVY_ID in ACTIVITY.
[ERROR]
Repeated column in mapping for entity: com.custom.businessclasses.ActivityServiceAttribute column: SRVC_ATTRIB_BUSNS_ACTVY_ID (should be mapped with insert="false" update="false")
[/ERROR]
====================================================================================
So, I modified the followng line to include insert="false" update="false" .
<property name="businessActivityHistoryAssocId" column="SRVC_ATTRIB_BUSNS_ACTVY_ID" type="string" length="47" not-null="true" lazy="false"/>
to
<property name="businessActivityHistoryAssocId" column="SRVC_ATTRIB_BUSNS_ACTVY_ID" type="string" length="47" not-null="true" lazy="false" insert="false" update="false"/>
Then I got the following Error.
[ERROR]
Association references unmapped class: com.custom.businessclasses.ActivityServiceAttribute
[/ERROR]
Requesting Help.
Thanks,
Sunil