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

Reply via email to