Commit 637459c2 authored by Matija Obreza's avatar Matija Obreza

Reverted ES object mapper changes

- Must lazy load data for ES
parent 04f89a7b
......@@ -197,7 +197,7 @@ public class ElasticsearchConfig {
mapper = new ObjectMapper();
Hibernate4Module hibernateModule = new Hibernate4Module();
hibernateModule.disable(Feature.FORCE_LAZY_LOADING);
hibernateModule.enable(Feature.FORCE_LAZY_LOADING);
hibernateModule.disable(Feature.SERIALIZE_IDENTIFIER_FOR_LAZY_NOT_LOADED_OBJECTS);
mapper.registerModule(hibernateModule);
......@@ -213,7 +213,7 @@ public class ElasticsearchConfig {
// serialization
mapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
mapper.disable(SerializationFeature.EAGER_SERIALIZER_FETCH);
// mapper.disable(SerializationFeature.EAGER_SERIALIZER_FETCH);
// explicit json views: every fields needs to be annotated, therefore enabled
mapper.enable(MapperFeature.DEFAULT_VIEW_INCLUSION);
mapper.setAnnotationIntrospector(new ElasticJacksonAnnotationIntrospector());
......@@ -223,7 +223,7 @@ public class ElasticsearchConfig {
@Override
public String mapToString(final Object object) throws IOException {
String x = mapper.writeValueAsString(object);
// System.err.println(x);
System.err.println(x);
return x;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment