Community
Participate
Working Groups
With may-be-invalid analysis the null-by-default multiplicity is a real pain. The OCLinEcore serialization culd be changed to default to [1], just like UML, but unlike Ecore, in text witjput affecting Ecore.
The OCLinEcore tutorial states that OCLinEcore follows UML rather than Ecore default multiplicity.
(In reply to Ed Willink from comment #0) > With may-be-invalid analysis the null-by-default multiplicity is a real pain. For *.ecore a change is not really a problem since the *.ecore setting is definitive; it's just a matter of which polarity is implicit in textual form. For Complete OCL (or OCLinEcore) source the default seems to guarantee may-be-invalid. Really tedious for Complete OCL tests.
testLoad_Bug402767_oclinecore written in 2013 tests for the original 'UML' behaviour. https://bugs.eclipse.org/bugs/show_bug.cgi?id=464927#c5 motivates the change for maximum compatibility in 2015. Since [1..1] is potentially breaking we will need a preference.
Preference with changed default pushed to master for M1,
New Gerrit change created: https://git.eclipse.org/r/c/ocl/org.eclipse.ocl/+/184577