Hi All...

In playing with EJB 2.0 and doing some reading, I see that when using the
new CMP system, an Entity Bean with dependant objects, when deleted, will
cause all of its dependant objects to be deleted as well. This makes sense
if the EB is intended to compose those dependant objects (that is, that the
EB is the only object with a reference to the dependant objects).

What happens if I want an EB to aggregate another EB? For example, what if
I have an Emploiee EB and an InsurancePlan EB. My company may have hundreds
of emploiees and three insurance plans, so many emploiees would want to
have the same insurance plan EB.

In this case, should the InsurancePlan EB be a dependant object for the
Emploiee EB? It would seem that when the Emploiee is removed, so is the
InsurancePlan, whih of course is not good.

So, my question is, how is a relationship like this handled? Is it possible
for an EB of one type to have a dependant EB of another type that is not
deleted when the parent EB is removed?

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