Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: ngong on February 25, 2025, 01:57:35 am

Title: {bag} what's that?
Post by: ngong on February 25, 2025, 01:57:35 am
(https://i.imgur.com/xZjn37N.png)

Many data elements show a text “{bag}” to the right of their name. What does this mean and how do I get rid of it?
Title: Re: {bag} what's that?
Post by: Geert Bellekens on February 25, 2025, 02:28:44 am
That is UML for:  "a collection that does not enforce uniqueness, or order"
It's what happens if you set both isOrdered and isUnique to false.
See §7.5.3.2 Multiplicities of the UML specs.

Select the properties of your attribute, click on the [...] next to multiplicity, and uncheck "Allow Duplicates"

Geert
Title: Re: {bag} what's that?
Post by: PDC on February 25, 2025, 07:18:00 pm
I never knew this was possible. Really useful little feature though. Thanks for asking and answering!

(Table 7.1 in UML spec 2.5.1, for anyone interested)
Title: Re: {bag} what's that?
Post by: ngong on February 25, 2025, 10:30:57 pm
 
That is UML for:  "a collection that does not enforce uniqueness, or order"
It's what happens if you set both isOrdered and isUnique to false.
See §7.5.3.2 Multiplicities of the UML specs.

Select the properties of your attribute, click on the [...] next to multiplicity, and uncheck "Allow Duplicates"

Geert
that's it. How would a script look like to uncheck "Allow Duplicates" for all attributes?
Title: Re: {bag} what's that?
Post by: Geert Bellekens on February 25, 2025, 10:45:13 pm
There is a property EA.Attribute.AllowDuplicates that you can set to false.

Geert