Issue with Association Direction Button in WME
Problem:
In the Association Details Dialog, a button in the top-right corner displays two arrows, similar to language-switching buttons in translation apps. This visually suggests that it switches the direction of an association. However, in practice, it do this by only swapping the class names while leaving multiplicities and roles un-swapped, which on the class diagram swaps the arrow direction together with the multiplicities and roles.
Why This Is an Issue:
If the association has predefined roles and multiplicities, pressing the button results in an incomplete transformation:
- Class names are swapped.
- Roles and multiplicities remain un-swapped, leading to potential unnoticed errors in model logic.
- This can create misleading associations, especially in bidirectional relationships.
Proposed Fix:
To ensure the button correctly reverses the association, the function should:
- Swap role names and multiplicities along with class names.
- Be disabled for bidirectional associations, where directionality doesn’t apply.
Implementing these improvements would eliminate unintended errors and create a clearer, more intuitive modeling experience.
This is addition to my today's comment "Issue with Passing Information to Django" in 272
To clarify the current behavior: The Multiplicity and Role (end name) values displayed in the Association panel are tied to the association ends, not directly to the class elements. When the direction of the association is changed, these properties are reassigned accordingly, they do not follow the class itself, because they are conceptually and structurally part of the association ends.
This behavior is consistent with standard modeling semantics: association ends define the relationship, and their attributes (like role names and multiplicities) are direction-sensitive. As such, changing the direction updates these values to maintain model consistency, not based on class labels.
That said, we understand how this behavior might not be immediately intuitive, particularly for users who are expecting the values to follow the class. We’ll take this into consideration and explore options to make this clearer in the UI, whether through tooltips, warnings, or improved visual feedback.
We have a diagram:
Pressing the button:
on the Association details dialog
we get
The role names and the multiplicities were moved to the oposite class instead of only changing the arrow direction
Is this the intended behavior?
To me, the real use of this button is to help modeling association ends as sometimes people get it wrong and add the multiplicites (or the composition) in the wrong end so with this you swap them. Of course if at the moment of swapping you've already added also association names, then indeed the result may be strange but I think it's indeed consistent
Ok, no issue.
On Sat, Apr 19, 2025, 17:30 Jordi Cabot @.***> wrote:
To me, the real use of this button is to help modeling association ends as sometimes people get it wrong and add the multiplicites (or the composition) in the wrong end so with this you swap them. Of course if at the moment of swapping you've already added also association names, then indeed the result may be strange but I think it's indeed consistent
— Reply to this email directly, view it on GitHub https://github.com/BESSER-PEARL/BESSER/issues/280#issuecomment-2816753621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGT5N6MAJTR3EIYAAIM6U4322JTZBAVCNFSM6AAAAAB3LYKSX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJWG42TGNRSGE . You are receiving this because you authored the thread.Message ID: @.***> jcabot left a comment (BESSER-PEARL/BESSER#280) https://github.com/BESSER-PEARL/BESSER/issues/280#issuecomment-2816753621
To me, the real use of this button is to help modeling association ends as sometimes people get it wrong and add the multiplicites (or the composition) in the wrong end so with this you swap them. Of course if at the moment of swapping you've already added also association names, then indeed the result may be strange but I think it's indeed consistent
— Reply to this email directly, view it on GitHub https://github.com/BESSER-PEARL/BESSER/issues/280#issuecomment-2816753621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGT5N6MAJTR3EIYAAIM6U4322JTZBAVCNFSM6AAAAAB3LYKSX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJWG42TGNRSGE . You are receiving this because you authored the thread.Message ID: @.***>