DATAES-141 add new constructor to fix: Mapping Context is null in

DefaultResultMapper when using custom Entitymapper
(cherry picked from commit 2367d89)
This commit is contained in:
dmaass 2014-12-17 10:16:25 +00:00 committed by Artur Konczak
parent acecc003cb
commit 0eaa4db1af

View File

@ -65,6 +65,13 @@ public class DefaultResultMapper extends AbstractResultMapper {
super(entityMapper);
}
public DefaultResultMapper(
MappingContext<? extends ElasticsearchPersistentEntity<?>, ElasticsearchPersistentProperty> mappingContext,
EntityMapper entityMapper) {
super(entityMapper);
this.mappingContext = mappingContext;
}
@Override
public <T> FacetedPage<T> mapResults(SearchResponse response, Class<T> clazz, Pageable pageable) {
long totalHits = response.getHits().totalHits();