This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Help with mapping set - Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Help with mapping set - Hibernate " Watch "Help with mapping set - Hibernate " New topic
Author

Help with mapping set - Hibernate

Leticia Barbalho
Ranch Hand

Joined: Sep 02, 2005
Posts: 37
I'm having problems writing a part of a mapping. First of all, I have these mappings:


I'm trying to put into the second mapping (auge.bean.OrdemItens) a set of the first one. I've tried it this way:



But I get an error saying: Foreign key (FKC24B75B6576D388F:MPPRODUCAO [numeroOrdemItens,materia])) must have same number of columns as the referenced primary key (ORDEMITENS [numeroOrdemItens])


What's wrong? Thanks for the help
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Help with mapping set - Hibernate
 
Similar Threads
hbm.xml file does an update instead of an insert- Helppppp
Hibernate - Force foreign key lookup on insert
Integrity constraint violation: for Hibernate Insert
Ternary and composite ID
Please suggest on this Mapping