Is it not possible to set up a
1 - n relationship with COCKTAIL and COCKTAIL_INGREDIENTS and a 1 to 1 with COCKTAIL_INGREDIENTS and INGREDIENTS ( using an 'extends' relationship )?
-a
-----Original Message-----
From: Elmar Seestaedt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 30, 2002 8:02 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Many-to-many relationship with attributes
Thanks for your quick response. Your solution would help if I could recreate
the db schema, but for the matter of fact the schema is as it is :-(
With your solution I would have to add new foreign keys to cocktail and
ingredient. And a new primary key to the "many to many relation with attributes
class".
Are there any other solutions for the problem?
TIA Elmar
>
> Typical Object/Relational impedance mismatch :
> Many to many mapping is a way to map three tables to only two
> classes. Columns from COCKTAIL are mapped to Cocktail attributes,
> columns from INGREDIENT are mapped to Ingredient attributes, but where
> do you handle COCKTAIL_INGREDIENT columns ?
> => you need another class
> => it is not a many to many relation
>
> I would suggest using two 1-n relations and three classes.
>
> Hope this helps...
>
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr f�r 1 ct/ Min. surfen!
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
