Hi,
For 1-N relationships, I use a reverse referencing mechanism.  I A has n B,
then I have a field in B hwich has the type of the remote interface of A.
Then I make a finder method in A that return a Collection of B remote
interfaces.
All that in CMP on JBoss.  The life is beautiful ;)
This is mandatory for EJB 1.1.
The disadvantage is that I store EJBObject as key in the database so bye bye
direct SQL.

If one A can share multiple B with another A, then I think its is possible
to do something like having a Collection of remote interfaces of, look at
jbosstest for an example.  But I do not think the EJB 1.1 spec require
anything for that.  Not sure.

For n-m nothing in the 1.1 spec but having a C in the middle is one
solution.

If you follow the principle of having one unique key for any tables, you
could also use this a field of primitive type wich saves the direct SQL
problem.  If multiple field is part of a key the PK object will be serialize
to the database so again bye bye SQL.

Vincent.

-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]De la part de Florian Bischof
Envoye : lundi 26 fevrier 2001 17:40
A : [EMAIL PROTECTED]
Objet : [jBoss-User] CMP Relationships


Hi all,

  is there an example, documentation or tutorial for relationships
(1-n/n-m) between container-managed persistence entity beans existing
(working on JBoss)?

Anyone already using CMP-relations on jBoss?

Thanks
  Florian



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to