aspose file tools*
The moose likes Object Relational Mapping and the fly likes Mapping composite primary key as a foreign key in a <set> gives me error Repeated column in mapping. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Mapping composite primary key as a foreign key in a <set> gives me error Repeated column in mapping." Watch "Mapping composite primary key as a foreign key in a <set> gives me error Repeated column in mapping." New topic
Author

Mapping composite primary key as a foreign key in a <set> gives me error Repeated column in mapping.

Deeps Mistry
Ranch Hand

Joined: Jan 31, 2009
Posts: 189
Hi,

I am trying to map a composite primary key and use it as a foreign key in a <set>.
Below is my hbm files -

CTBR.hbm.xml


CRA.hbm.xml



The error which i get on running is -



Can i not map composite primary key as a foreign key?

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mapping composite primary key as a foreign key in a <set> gives me error Repeated column in mapping.
 
Similar Threads
Need many-to-one mapping help
[Help] Hibernate composite key plus foreign key with cascade insert.
ORA-00001: unique constraint exception
ObjectNotFoundException No row with the given identifier exists
hbm.xml file does an update instead of an insert- Helppppp