1
0
mirror of synced 2026-08-05 16:37:04 +00:00

Fix recative mapping creation.

Original Pull Request #1821
This commit is contained in:
Peter-Josef Meisch
2021-05-19 23:40:11 +02:00
committed by GitHub
parent 0836411d45
commit 5ed655e0aa
2 changed files with 6 additions and 1 deletions
@@ -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);