What you are doing by specifying one table is correcting a bug in Orion's
automatic table creation code that results from its lack of bi-directional
support (Orion wants to create a table for each side of the relationship.)
However, this won't give you bi-directionality, which you can easily verify.
Add/remove one bean from the other's Collection (or Set, etc) and you won't
see it reflected in the other bean's Collection.
The solution I've been limping along with is to manage all bi-directional
relationships with a separate Session bean that explicitly updates both
sides of the relationship.  (If you model the relationship with one db
table, you will have to manually catch the duplicate key exceptions as
well.)
----- Original Message -----
From: "Alex Paransky" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Tuesday, July 03, 2001 12:38 AM
Subject: Bi-directional N-to-N support does it work in orion?


> I read some time ago that Orion does not support bi-directional N-to-N
> relationships.  Recently (1.5.2) I created such a relationship and
initially
> Orion created TWO relationship tables.  Afterwards, I removed one of the
> tables, and updated orion-ejb-jar.xml to use the same table for both sides
> of the relationship.
>
> Question:  Is this type of usage supported in Orion 1.5.2?  Am I asking
for
> trouble?  Is anyone aware of any problems with using orion-ejb-jar.xml to
> "manipulate" the deployment descriptor in such a way?
>
> Thanks.
> -AP_
>
>



Reply via email to