Is this question solved by my answer to your previous question? If not:
1) What do you mean by "My problem is that I am unable to map the relationship
as to related class map without removing foreign key(2)." ? Does this mean you
have to remove foreign key (2) to map the class? Or that you must have FK (2)?
2) What is the point of FK (1)? It doesn't make sense to me that this should be
both the primary key and a foreign key.
3) Why is <parentActivity> a child of <activity>? If you nest elements -- that
is, <activity> has <activity> children -- then the <dataKey> element in the
parent <activity> element will provide this information for its child
<activity> elements. Having <parentActivity> in the child means that the data
is redundant -- it occurs in both the parent and the child.
> My XML document is as follows:
> The two tables I would like to be able to map these elements to are
> primary key - recordId,applicationId
> primary key - childRecordId,childApplicationId
> foreign key(1) - childRecordId,childApplicationId references
> foreign key (2)- parentRecordId,parentApplicationId references
> My problem is that I am unable to map the relationship as to related
> class map without removing foreign key(2).
> I would like to be able to map <parentActivity> to the Activity class
> and as a related class to the subActivities table.Any