This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Many-to-many composite ID Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Many-to-many composite ID" Watch "Many-to-many composite ID" New topic
Author

Many-to-many composite ID

Jonathan Huang
Ranch Hand

Joined: Jun 23, 2006
Posts: 35
Is there a way to map a many-to-many set that does not use the entire composite ID of the association.

Table1's PK = column1 + column2 + column3
Table2 only has column1 and column2 that associate to Table1.

For Example we have two mappings:





The code above throws a: "must have same number of columns as the referenced primary key (webquest.OTOSTLKPSCALE [JOB,SCLNAME,SCLPUNCH])" error.

Thanks in advance and I hope I was clear in describing my issue.
[ July 25, 2006: Message edited by: Jonathan Huang ]
Jonathan Huang
Ranch Hand

Joined: Jun 23, 2006
Posts: 35
Anyone?

Still having trouble figuring this one out!

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Many-to-many composite ID
 
Similar Threads
Please suggest on this Mapping
Legacy and Hibernate1-2-M Mapping
Hibernate - Force foreign key lookup on insert
Need many-to-one mapping help
Help with mapping set - Hibernate