Skip to content

DATAMONGO-1373 - Allow usage of @AliasFor for composed query, mapping, and index annotations. #347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

christophstrobl
Copy link
Member

We now resolve aliased attribute values when reading @Document on entity types. This allows creation of composed annotations like:

@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
@Document
static @interface ComposedDocumentAnnotation {

  @AliasFor(annotation = Document.class, attribute = "collection")
  String name() default "custom-collection-name";
}

Related issue: DATACMNS-825
Related PR: spring-projects/spring-data-commons#156

…tation.

We now resolve aliased attribute values when reading @document on entity types. This allows creation of composed annotations like:

@retention(RetentionPolicy.RUNTIME)
@target({ ElementType.TYPE })
@document
static @interface ComposedDocumentAnnotation {

  @AliasFor(annotation = Document.class, attribute = "collection")
  String name() default "custom-collection-name";
}

----

Related issue: DATACMNS-825
mp911de added a commit that referenced this pull request Mar 14, 2016
…nnotations.

We now support @AliasFor to build composed annotations with: @document, @id, @field, @indexed, @CompoundIndex, @GeoSpatialIndexed, @TextIndexed, @query, and @meta.

Original pull request: #347.
@mp911de mp911de force-pushed the issue/DATAMONGO-1373 branch from 13d2116 to 045b3ca Compare March 14, 2016 11:19
mp911de added a commit that referenced this pull request Mar 14, 2016
…nnotations.

We now support @AliasFor to build composed annotations with: @document, @id, @field, @indexed, @CompoundIndex, @GeoSpatialIndexed, @TextIndexed, @query, and @meta. Added missing license header to @field.

Original pull request: #347.
@mp911de mp911de changed the title DATAMONGO-1373 - Allow usage of @AliasFor for composed @Document annotation. DATAMONGO-1373 - Allow usage of @AliasFor for composed mapping and index annotations. Mar 14, 2016
@mp911de mp911de changed the title DATAMONGO-1373 - Allow usage of @AliasFor for composed mapping and index annotations. DATAMONGO-1373 - Allow usage of @AliasFor for composed query, mapping, and index annotations. Mar 14, 2016
@mp911de mp911de force-pushed the issue/DATAMONGO-1373 branch from 045b3ca to b3e82c9 Compare March 14, 2016 11:20
mp911de added a commit that referenced this pull request Mar 14, 2016
…nnotations.

We now support @AliasFor to build composed annotations with: @document, @id, @field, @indexed, @CompoundIndex, @GeoSpatialIndexed, @TextIndexed, @query, and @meta. Added missing license header to @field.

Original pull request: #347.
@mp911de mp911de force-pushed the issue/DATAMONGO-1373 branch from b3e82c9 to 3326592 Compare March 14, 2016 13:07
mp911de added a commit that referenced this pull request Mar 14, 2016
…nnotations.

We now support @AliasFor to build composed annotations with: @document, @id, @field, @indexed, @CompoundIndex, @GeoSpatialIndexed, @TextIndexed, @query, and @meta. Added missing license header to @field.

Original pull request: #347.
…nnotations.

We now support @AliasFor to build composed annotations with: @document, @id, @field, @indexed, @CompoundIndex, @GeoSpatialIndexed, @TextIndexed, @query, and @meta. Added missing license header to @field.

Original pull request: #347.
@mp911de mp911de force-pushed the issue/DATAMONGO-1373 branch from 3326592 to fba2315 Compare March 14, 2016 13:09
odrotbohm pushed a commit that referenced this pull request Mar 15, 2016
…tation.

We now resolve aliased attribute values when reading @document on entity types. This allows creation of composed annotations like:

@retention(RetentionPolicy.RUNTIME)
@target({ ElementType.TYPE })
@document
static @interface ComposedDocumentAnnotation {

  @AliasFor(annotation = Document.class, attribute = "collection")
  String name() default "custom-collection-name";
}

Original pull request: #347.
Related issue: DATACMNS-825.
odrotbohm pushed a commit that referenced this pull request Mar 15, 2016
…nnotations.

We now support @AliasFor to build composed annotations with: @document, @id, @field, @indexed, @CompoundIndex, @GeoSpatialIndexed, @TextIndexed, @query, and @meta. Added missing license header to @field.

Original pull request: #347.
Related tickets: DATACMNS-825.
odrotbohm added a commit that referenced this pull request Mar 15, 2016
Added method, field and annotation target to @field annotation explicitly. Fixed copyright date ranges where needed.

Tweaked formatting in test cases.

Original pull request: #347.
Related ticket: DATACMNS-825.
@odrotbohm odrotbohm closed this Mar 15, 2016
@odrotbohm odrotbohm deleted the issue/DATAMONGO-1373 branch March 15, 2016 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants