Dan Christopherson <[EMAIL PROTECTED]> wrote:
>I'd say that the dependent object has no identity that is meaningful
>outside of the context of its parent.
Right.
>If you have three dependent
>instances of the same class associated with the same parent, they must
>have their own identities if you do not consider them equivalent, right?
It's up to the parent to the distinguish between them; this is usually done
on the basis of a property meaningful to the parent. Example: a user has a
profile that specifies his preferences (timezone and date/time formatting).
If there are multiple profiles, it makes sense for the user to name each of
these profiles and for the app to enforce the constraint that will not allow
the user to use the same profile name on more than one profile.
A more interesting question is whether the above will always hold true and
based on my experience I can say that it can be made true if the application
architect understands the nature of the dependency. This would be a "proper"
way to model a relationship but the spec opts for an easier solution which
requires the bean provider to write a primary key class for the dependent
class. Fair enough but why should that be mandatory, especially in cases
where there's a 1:1 rather than 1:N relationship between the parent and the
dependent object?
Alex Smith
Insight LLC
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.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".