Re: Bi-directional N-to-N support does it work in orion?

2001-07-03 Thread Scot Weber

Current OrionServer 1.5.2 is EJB2.0PFD1 compliant, not EJB2.0PFD2.  Not
speaking for the developers, but merely surmising, I would suspect that
it will remain PFD1 until the spec is in final.  No sense chasing a
rabit down the hole! =)

- scot

Alex Paransky wrote:
 
 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_

-- 

  scot weber - [EMAIL PROTECTED]
  -
  Given a choice between a folly and a sacrament, one should
  always choose the folly -- because we know a sacrament
  will not bring us closer to God and there's always a chance
  that a folly will. - Erasmus

  The only man who never makes a mistake is the man who
  never does anything. - Theodore Roosevelt.




RE: Bi-directional N-to-N support does it work in orion?

2001-07-03 Thread Alex Paransky

I believe bi-directional relationships were in the initial draft of the 2.0
EJB spec.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Scot Weber
Sent: Tuesday, July 03, 2001 7:14 AM
To: Orion-Interest
Subject: Re: Bi-directional N-to-N support does it work in orion?


Current OrionServer 1.5.2 is EJB2.0PFD1 compliant, not EJB2.0PFD2.  Not
speaking for the developers, but merely surmising, I would suspect that
it will remain PFD1 until the spec is in final.  No sense chasing a
rabit down the hole! =)

- scot

Alex Paransky wrote:

 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_

--

  scot weber - [EMAIL PROTECTED]
  -
  Given a choice between a folly and a sacrament, one should
  always choose the folly -- because we know a sacrament
  will not bring us closer to God and there's always a chance
  that a folly will. - Erasmus

  The only man who never makes a mistake is the man who
  never does anything. - Theodore Roosevelt.





Re: Bi-directional N-to-N support does it work in orion?

2001-07-03 Thread Reid Hartenbower

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_