Skip to content

ST6RI-947 (supplemental) Remove model mutation in adapters for default multiplicity - #821

Merged
seidewitz merged 1 commit into
masterfrom
ST6RI-947
Oct 22, 2026
Merged

seidewitz merged 1 commit into
masterfrom
ST6RI-947

Conversation

@seidewitz

@seidewitz seidewitz commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

This PR revises the update to default multiplicity implementation made in PR #815.

The main purpose of the changes in PR #815 were to move the implementation of default multiplicity from the transformation adapters to the post-processing adapters. However, it also removed one of the criteria for adding a default multiplicity to a usage: "The usage does not have any explicit owned subsettings or owned redefinitions that have no owning type" (as it was previously implemented).

Subsequently, testing on the library and example models included in a release indicated that this criteria change had a significant impact, resulting in several cases in which explicit multiplicities needed to be added to redefining features (specifically when the original multiplicity lower bound was greater than 1). This is a negative impact for the modeler, because it requires looking up the redefined feature and copying its multiplicity.

So, this PR adds back a limited version of the criterion removed in PR #815: "The usage does not have any explicit owned redefinition relationships." Leaving non-redefinition subsetting out of this criterion (i.e., giving default multiplicities to subsetting but non-redefining features) avoids situations such as the following:

attribute m1 : ISQ::MassValue; // Multiplicity 1..1
attribute m2 :> ISQ::mass;     // Multiplicity 0..* (if no default multiplicity)

@seidewitz seidewitz added this to the 2026-09 milestone Oct 22, 2026
@seidewitz seidewitz self-assigned this Oct 22, 2026
@seidewitz seidewitz added the bug Something isn't working label Oct 22, 2026
@seidewitz
seidewitz merged commit 3866507 into master Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant