DiscourseDB / discoursedb-core

DiscourseDB Core Repository
GNU General Public License v2.0
10 stars 4 forks source link

[io-model] AnnotationService.addAnnotation() doesn't always persist aggregate relation #15

Open ferschke opened 8 years ago

ferschke commented 8 years ago

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.