Hi,
I observed that annotations defined on a root group of a model appear to not be carried over to an include group in a superordinate model once the models are expanded.
- Is this intentional? It seems strange since annotations cannot be defined for an include group in the superordinate model either, so it appears there is no way at all to define annotations on these groups?
- Is there a way to circumvent this / enforce annotations on the include group?
Thanks, best regards
Specifically, looking at the code, this issue appears to be caused in DocumentModelExpandService#integrateModelIntoGroup which only seems to copy the child elements, but not the annotations
(I created <INTERNAL_LINK> for this)
Hi @marcel-calm-dew,
regarding kernel expand service, the described behavior is intended.
The idea was, explained with an example: you have the model Address.json and you want to include it in another model twice at the same level (BillingAddress and ShippingAddress), for that, you have to create the corresponding groups with their own name and repeatability. That’s why we just transfer the children of the included model, the other properties (name, repeatability, annotations, etc) should be defined in the host/base model.
I don’t know the reason(s) why it is not allowed while modeling to have annotations in include-groups, but I would not expect that, @timo-agile-fog or @eva-solid-surge: Do you know the reasons?
Note: If transfering annotations from the included root group to the including group in the host model is required, it is important to define what to do in case of collisions (included root group and including group could have an annotation with the same name, but different value). But this would be a new requirement.
Hi @gildardo-cached-canyon,
I can only imagine it is not possible to set annotations on include groups in the SME because it was not possible to set them in the old Data Modeler either and the behaviour was transferred to the SME as it was. If it should be possible to set annotations to include groups, we need to create a requirement. Can you confirm that the document model allows to have annotations on include groups?
Thanks for the feedback. I can understand the rationale behind this. In this case, I agree that the annotation should be allowed to be created on the include group within the including model (and allowed to be defined as such in the SME).
Hi @eva-solid-surge,
thanks for the info, I can now think of this reason.
Yes, I confirm that the document model allows annotations in include-groups.