Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Adding associations to a join entity..

 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm running into some errors when trying to hang supplementary associations off of a join entity.


Ie StudioCompetition is a join entity that replaces a direct M:M between Affiliation and Competition that provides a place to hang additional qualifies of the association.

I can't seem to figure out how to allow hook up the extra associations -- I get errors regarding the number of columns in the foreign key.

My current setup looks like:

which yields an error like:


Earlier I had the association on the StudioSessionPrice named "affiliation" of Type Affiliation... so it wasn't really bi-directional (more of a loop). Which fails with a similar error message -- different wording, but same general intent -- wrong number of columns.. That error made sense since I had the mapped by of something with a two column PK mapped by a single column/wrong type. So I switched to the code shown above.

Is there a way to back the supplementary association work? Or do I need to lose the compound primary key, add an artificial key to the join table and just treat it like a regular entity?
[ December 25, 2008: Message edited by: Eric Nielsen ]
 
Squanch that. And squanch this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic