This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies 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
hbm.xml file does an update instead of an insert- Helppppp
[Help] Hibernate composite key plus foreign key with cascade insert.
ObjectNotFoundException No row with the given identifier exists
ORA-00001: unique constraint exception