I want to create some kind of optional attributes:
My parent-concept has 0..n children of type Attributes.
Attributes has several sub-concepts.
Now I want to create a constraint so that each sub-concept is only allowed once.
When i create a constraint "can be child"
and test if the parent concept has already one child of that concept, then it would work as expected.
BUT: The constraint is also called to check the model and then it's not ok, cause now the parent has a one concept and that doesnt fullfill the constraint.
What I would need to do is to know if can be child is called to get the suggestions or if it is called to check the model.
Any ideas on that?
A solution would be if I could access the child's instance when it is available (on the check of the model). Otherwise it could be null.