DATAJPA-283 - Support accessor method level mapping annotations.
Upgraded to use new methods introduced for DATACMNS-269 to be able to detect mapping annotations independently of whether they are declared on the field or an accessor method for the property. Upgraded to new artifactId Spring Data Commons is distributed under.
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -241,7 +241,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-data-commons-core</artifactId>
|
||||
<artifactId>spring-data-commons</artifactId>
|
||||
<version>${spring.data.commons.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012 the original author or authors.
|
||||
* Copyright 2012-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -91,7 +91,7 @@ class JpaPersistentPropertyImpl extends AnnotationBasedPersistentProperty<JpaPer
|
||||
public boolean isIdProperty() {
|
||||
|
||||
for (Class<? extends Annotation> annotation : ID_ANNOTATIONS) {
|
||||
if (field.getAnnotation(annotation) != null) {
|
||||
if (isAnnotationPresent(annotation)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -122,7 +122,7 @@ class JpaPersistentPropertyImpl extends AnnotationBasedPersistentProperty<JpaPer
|
||||
public boolean isAssociation() {
|
||||
|
||||
for (Class<? extends Annotation> annotationType : ASSOCIATION_ANNOTATIONS) {
|
||||
if (field.getAnnotation(annotationType) != null) {
|
||||
if (findAnnotation(annotationType) != null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user