Skip to content

Commit 2367d89

Browse files
committed
DATAES-141 add new constructor to fix: Mapping Context is null in
DefaultResultMapper when using custom Entitymapper
1 parent f309046 commit 2367d89

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/org/springframework/data/elasticsearch/core/DefaultResultMapper.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ public DefaultResultMapper(EntityMapper entityMapper) {
6565
super(entityMapper);
6666
}
6767

68+
public DefaultResultMapper(
69+
MappingContext<? extends ElasticsearchPersistentEntity<?>, ElasticsearchPersistentProperty> mappingContext,
70+
EntityMapper entityMapper) {
71+
super(entityMapper);
72+
this.mappingContext = mappingContext;
73+
}
74+
6875
@Override
6976
public <T> FacetedPage<T> mapResults(SearchResponse response, Class<T> clazz, Pageable pageable) {
7077
long totalHits = response.getHits().totalHits();

0 commit comments

Comments
 (0)