File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/main/java/org/springframework/data/couchbase/core/mapping Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package org .springframework .data .couchbase .core .mapping ;
18
18
19
- import org .springframework .data .annotation .Id ;
20
19
import org .springframework .data .mapping .Association ;
21
20
import org .springframework .data .mapping .MappingException ;
22
21
import org .springframework .data .mapping .model .AnnotationBasedPersistentProperty ;
28
27
29
28
import com .couchbase .client .core .deps .com .fasterxml .jackson .annotation .JsonProperty ;
30
29
31
- import java .util .Locale ;
32
-
33
30
/**
34
31
* Implements annotated property representations of a given {@link Field} instance.
35
32
* <p/>
@@ -99,7 +96,13 @@ public String getFieldName() {
99
96
// DATACOUCH-145: allows SDK's @Id annotation to be used
100
97
@ Override
101
98
public boolean isIdProperty () {
102
- return isAnnotationPresent (Id .class ) || super .isIdProperty ()
103
- || this .getFieldName ().toLowerCase (Locale .ROOT ).equals ("id" );
99
+ if (super .isIdProperty ()){
100
+ return true ;
101
+ }
102
+ // is field named "id"
103
+ if (getName ().equals ("id" )){
104
+ return true ;
105
+ }
106
+ return false ;
104
107
}
105
108
}
You can’t perform that action at this time.
0 commit comments