RefersToImpl

Brian Smith <[email protected]> Sun, 13 Oct 2002 22:22:00 -0500
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Organization CollabNet Hosting
Message-ID <[email protected]>
Hi,

I'm curious about why the change was made to RefersToImpl to 
automatically sync the reference's attributes (isChangeable, 
multiplicity) to match the attribute that it links to. I think this 
behavior is really suprising, given:

(a) The constraints that this behavior supports are deferred. I guess it 
isn't defined in the spec, but presumably it should be okay for the 
values of these attributes to be different until 
refVerifyConstraints(...) is called on the reference and/or the association.

(b) The behavior is not consistent among the Reference-AssociationEnd 
constraints like ReferenceTypeMustMatchEndType (the reference's type 
chould be set the same as the associations), 
ReferencedEndMustBeNavigable (adding a reference to an association end 
could presumably make it navigable).

(c) It goes against the "style guide" in the MOF 1.4 spec (4.13.3 Update 
operations should only change the nominated metadata).

(d) If you change the reference's multiplicity/type/changeability after 
the link has been added, will association's attributes change? (and vice 
versa?)

(e) How do you know that the reference has the wrong values and the 
association has the right ones?

Thanks,
Brian