>Delivered-To: [EMAIL PROTECTED]
>MIME-Version: 1.0
>Content-transfer-encoding: 7BIT
>Date: Thu, 1 Nov 2001 18:49:08 -0500
>From: Daniel OConnor <[EMAIL PROTECTED]>
>Subject: set accessor for multi-valued relationships
>To: [EMAIL PROTECTED]
>
>Hi,
>
>Can a set accessor for a multi-valued relationship be called with an
>arbitrary java.util.Set or java.util.Collection, as long as the contents
>of that collection are of the correct type?

Yes.

>Or is the set accessor for
>multi-valued relationships strictly used for collections from the
>same cmr field in different instances, the behavior of which is
>described in 10.3.6.2 and 10.3.7? For instance, look at the
>following passage:
>
>"The Bean Provider can thus use the set method to move objects
>between the collections referenced by cmr-fields of the same
>relationship type in different instances. The set accessor method,
>when applied to a cmr-field in a one-
>to-many relationship thus has the semantics of the
>java.util.Collection methods clear, followed by addAll, applied to the
>target collection; and clear, applied to the source collection. It is the
>responsibility of the container to transfer the contents of the
>collection instances in the same transaction context."
>
>It doesn't make sense that the container would call "clear" on the
>source collection in the case that the source collection is a generic
>collection class. But this passage could be read as describing the
>special case that the bean provider is using the set cmr accessor
>to move objects between different instances, without being
>prescriptive.
>

The above paragraph refers to the one-to-many semantics of assignment
between cmr-fields of the same relationship type.  The clear of the
source collection would only happen in the above case, because it is
needed to maintain the referential integrity of the relationships.

Thanks for pointing out this confusion.  We'll clarify better in the next
release.

Linda

>Thanks,
>
>Dan
>
>===========================================================================
>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