It works for me.  I have an entity whose PK is a compound of two CMR
1->N fields.  HOWEVER, I'm only using Collection mapping, not Set (which
it looks like you're using).  If you can't figure out what's wrong with
your code, try using Collection and see if that fixes the problem.

I would like to use Set and Map and all those cool interfaces too, but
(aside from whether or not they work) they are not portable.
Unfortunately the latest iteration of the spec only provides for
java.util.Collection.  :-(

Jeff

>-----Original Message-----
>From: Christian Billen [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, March 13, 2001 1:39 PM
>To: Orion-Interest
>Subject: Using another EJB as part of the Primary Key Class
>
>
>Hi everyone,
>
>Can one specify another EJB Entity object as part of the 
>primary key for one
>ejb?
>
>Here is a imaginary example:
>
>TreeEJB has a one to many relationship to AppleEJB
>
>And I have a primary key for AppleEJB which contains TreeEJB 
>and a AppleID
>
>In my application when I tried to do something similar to the 
>figurative
>example above I got:
>Apple_ORSet295.java:294: Exception java.rmi.RemoteException 
>must be caught,
>or it must be declared in the throws clause of this method.
>
>I can't quite model this as a dependent relationship because I might be
>refering this AppleEJB from other EJB.
>
>Now my question: is this a bug or is it something I should not 
>be doing? how
>else could I model that an apple must be unique within its tree?
>suggestions?
>
>Thanks,
>
>Christian
>
>
>

Reply via email to