- Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
omar alles opened DATAMONGO-1373 and commented
Cause 1.9 relies on AnnotationUtils, it should provide full support for custom annotations and should support Springs 4.2 AliasFor annotations.
Consider a custom annotation metaannotated with @Document annotation.
Let it have a collection attribute, alias for @Document collection attribute.
Let it not be marked as @Inherited.
Let a pair of entities, a parent and a child. Let the parent be annotated with the custom annotation, and set a given value for its collection atribute.
You would expect both entities, when made PersistentEntities, have the same collection name provided in the collection attribute.
Actual result is that both of them get the fallback collection name and not the collection name provided.
I thought it could caused because of @Document being @Inherited.
How does @Inhereted affect AnnotationUtils search algortihm?
Once you go through AnnotationUtils, could @Document annotated with @Inherited be considered residual? See BasicMongoPersistentEntity
Anyway, i tried removing @Inherited annotation and same result.
Affects: 1.9 M1 (Hopper)
Reference URL: https://github.com/oalles/spring-data-custom-annotation-bug
Issue Links:
-
DATACASS-259 Allow usage of Spring 4.2
@AliasForfor Cassandra annotations -
DATACMNS-825 Allow usage of composed annotations on PersistentEntity and PersistentProperty using
@AliasFor
Referenced from: pull request #347