DATAREST-897 - Switched to use approximated Map in NestedEntitySerializer.
We now use CollectionFactory.createApproximateMap(…) to avoid picking up persistence technology specific Map implementations that might cause issues (e.g. requiring a Session in the case of Hibernate). Related tickets: DATAREST-864.
This commit is contained in:
@@ -356,7 +356,7 @@ public class PersistentEntityJackson2Module extends SimpleModule {
|
||||
} else if (value instanceof Map) {
|
||||
|
||||
Map<?, ?> source = (Map<?, ?>) value;
|
||||
Map<Object, Object> resources = CollectionFactory.createMap(value.getClass(), source.size());
|
||||
Map<Object, Object> resources = CollectionFactory.createApproximateMap(value.getClass(), source.size());
|
||||
|
||||
for (Entry<?, ?> entry : source.entrySet()) {
|
||||
resources.put(entry.getKey(), toResource(entry.getValue()));
|
||||
|
||||
Reference in New Issue
Block a user