When adding a new annotation to an entity that did not have an annotation before it could happen that the newly created AnnotationAggregate is not associated with that entity.
An explicit save operation on that entity after adding the annotation helps.
This should be built-in to the addAnnotation method, but we cannot simply use a service or repository since the addAnnotation method is not specific to a particular entity type.
When adding a new annotation to an entity that did not have an annotation before it could happen that the newly created AnnotationAggregate is not associated with that entity. An explicit save operation on that entity after adding the annotation helps. This should be built-in to the addAnnotation method, but we cannot simply use a service or repository since the addAnnotation method is not specific to a particular entity type.