Hello Jim,

<vendor>

The first case you mention is simple. A CMP Entity bean can have references to
other CMP Entity beans and it will be handled automatically with any server.

However, using Collections in CMP beans is not yet standardized, so it can be
dangerous to use (until EJB2.0 is out). But some servers support this, for
example the Orion Application Server.

We allow you to keep all types of collections in your CMP beans, be it a Map, a
Set, a List or just a Collection. Of course all persistence is automatically
handled and the tables are automatically generated.

</vendor>

Regards,
Karl Avedal
The Orion team (http://www.orionserver.com)

Jim Archer wrote:

> Hi All...
>
> I'm trying to understand how references to entity beans work in EJB 1.1
> servers when using CMP. I'm sorry this is kind of convoluted, but I have
> been through a few books and and web sites and have not figured out how
> this works.
>
> I'm interested in modeling my world using entity beans that have reference
> to other entity beans, like I would in any other OO system. I don't
> understand how all this works in EJB when I am using CMP.
>
> If I have an eb that represents a child, and another eb that represents an
> address, I would like to put a reference to an Address eb in my Child eb
> and have CMP handle persisting both of the beans. If I do that will the
> address in some way be persisted with the Child eb (maybe by saving its
> primary key)? When I later do a find that loads the Child eb from the
> database will the Address eb be loaded as well?
>
> Now, what if I want to model the Child having some not fixed number of
> toys? I would like for the Child eb to have an instance of a Collection of
> Toy entity beans. Can I do this such that when the Child is persisted that
> all the tpys get persisted as well?
>
> Thanks very much!
>
> Jim

===========================================================================
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