My understanding is you are trying to model an entity bean where dependent
objects are involved.
Checkout section 9.1.2(Granularity of Entity beans), that might help

Venkat

-----Original Message-----
From: Edward Barrett [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 14, 2000 8:48 AM
To: [EMAIL PROTECTED]
Subject: EJB design when one object has a second within


Has anyone a recommendation for modelling EJBs when one object (say
customer) has another object (say address) which only they can own
[customer/address is therefore not a perfect example].

Ideally object #1 would have a reference to object #2.  But I think I am
right in saying that CMP could then not be used to farm object #2's data and
store within the database row - is this correct ?

An obvious way I can see around this is to dispense with object #2 and have
the data stored as attributes in object #1 but this does not seem very
OO-ish.

Alternatively, object #2 could be upgraded to an EJB, I could determine a
simple type PK and store this within object #1.  But what if the primary key
is more complex (address would probably have building designation and postal
code) ?

TIA

Ed

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

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