mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-05-30 00:32:12 +00:00
parent
0836411d45
commit
5ed655e0aa
@ -210,6 +210,7 @@ abstract class AbstractDefaultIndexOperations implements IndexOperations {
|
||||
|
||||
// load mapping specified in Mapping annotation if present
|
||||
Mapping mappingAnnotation = AnnotatedElementUtils.findMergedAnnotation(clazz, Mapping.class);
|
||||
|
||||
if (mappingAnnotation != null) {
|
||||
String mappingPath = mappingAnnotation.mappingPath();
|
||||
|
||||
|
@ -183,7 +183,11 @@ class DefaultReactiveIndexOperations implements ReactiveIndexOperations {
|
||||
Mapping mappingAnnotation = AnnotatedElementUtils.findMergedAnnotation(clazz, Mapping.class);
|
||||
|
||||
if (mappingAnnotation != null) {
|
||||
return loadDocument(mappingAnnotation.mappingPath(), "@Mapping");
|
||||
String mappingPath = mappingAnnotation.mappingPath();
|
||||
|
||||
if (hasText(mappingPath)) {
|
||||
return loadDocument(mappingAnnotation.mappingPath(), "@Mapping");
|
||||
}
|
||||
}
|
||||
|
||||
String mapping = new MappingBuilder(converter).buildPropertyMapping(clazz);
|
||||
|
Loading…
x
Reference in New Issue
Block a user