My apologies - I got it into my head that we were talking N-M (I cannot
believe that Orion currently uses an intermediate table for 1-N !). Yes,
you definitely need one for N-M, but not for 1-N.
Best wishes,
Tony.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Schnitzer
Sent: 23 January 2001 10:48
To: Orion-Interest
Subject: RE: O/R Mapping
The extra table is definately unnecessary, and hopefully it will go away
in a future version of Orion. Take a look at bug #209 in Bugzilla.
Jeff Schnitzer
[EMAIL PROTECTED]
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 23, 2001 12:14 AM
>To: Orion-Interest
>Subject: O/R Mapping
>
>
>
>
>Hi Tony!
>
>Thanks for your quick answer. But I'm still not convinced.
>Besides many to
>many relation there is, as I see it, no need for a third table
>(with this
>principle, a many-to-many relation would result in five tables as you
>translate it to two many-to-one, or?). Let me exemplify my
>conception with
>order and orderlines (one to many):
>
>OO-model
>
>Order:
> public abstract void setOrderId(String orderId);
> public abstract String getOrderId();
> public abstract Collection getOrderLines(); // A
>collection with references to orderlines
>
>OrderLines:
> public abstract void setOrderLineId(String orderLineId);
> public abstract String getOrderLineId();
>
>An ER-model of the same relation would according to my
>conception be as follows (if you disregard the mapping):
>
>Order:
> OrderId (PK)
>
>OrderLines
> OrderLineId (PK)
> OrderId (FK) // Foreign key to order.
>
>In this case there is no redundancy. Or am I totally lost?
>
>Regards, Theis.
>
>
>
>
>
>