This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Mapping composite primary key as a foreign key in a <set> gives me error Repeated column in mapping.
 
It's not a secret anymore!