Quoting Erik Voldal <[EMAIL PROTECTED]>:
> I've got situations where I want to implement an ad hoc 1-many relationship
> from one CMP entity to a number of other CMP entities.

There is a bean called OneToMany that does this at
http://www.simscomputing.com/products/etk/

It stores the entity's PK along with its JNDI home name. To later retrieve a
remote reference out of the 1-many relationship, it does a findByPrimaryKey()
against the JNDI home name.

> Primary key objects would also not be sufficient in general, although they
> could work if the instances were restricted to being all managed by the
> same Home.

This is sort of what OneToMany does. However, not all the JNDI home names need
be the same. You can put different types of entites in the 1-many relationship,
each having a different JNDI name if you want.

hope that helps,
david

--
David Sims               [EMAIL PROTECTED]
Sims Computing, Inc.       www.simscomputing.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to