..*-associations should be Set by default? [message #61100] |
Wed, 20 August 2008 23:33  |
Eclipse User |
|
|
|
Hi...
I stumbled upon something I read in the OCL specification:
In chapter 7.5.3 of OCL 2.0 (formal/06-05-01) on page 16 I read that "By
default, navigation will result in a Set." I think this is really strange,
because the UML dedicated the constraint {unique} for association-ends to
turn it into a Set. So according to the UML it should be a Bag by default.
How could I specify a association-end to be a Bag according to the
OCL-specification?
Can anybody point me to what I missed?
Stefan
|
|
|
Re: ..*-associations should be Set by default? [message #61124 is a reply to message #61100] |
Thu, 21 August 2008 08:56  |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
Hi, Stefan,
This statement in the specification is, technically, correct. The UML
stipulates for MultiplicityElement these default (meta-)attribute values:
isOrdered = false
isUnique = true
Thus, the default collection type for mulivalued features is Set.
To get a bag, you must explicitly set isUnique to false.
HTH,
Christian
Stefan Schulze wrote:
> Hi...
>
> I stumbled upon something I read in the OCL specification:
> In chapter 7.5.3 of OCL 2.0 (formal/06-05-01) on page 16 I read that "By
> default, navigation will result in a Set." I think this is really strange,
> because the UML dedicated the constraint {unique} for association-ends to
> turn it into a Set. So according to the UML it should be a Bag by default.
> How could I specify a association-end to be a Bag according to the
> OCL-specification?
> Can anybody point me to what I missed?
>
> Stefan
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03290 seconds