DATAREST-880 - Prevent nested-entity-as-resource handling for unwrapped properties.

We now exclude properties that are marked as to be unwrapped from getting the nested-entity-as-resource behavour applied as it doesn't make any sense.
This commit is contained in:
Oliver Gierke
2016-08-29 19:26:07 +02:00
parent 72e4ef025d
commit 4cb0632518
3 changed files with 33 additions and 1 deletions

View File

@@ -273,7 +273,7 @@ public class PersistentEntityJackson2Module extends SimpleModule {
continue;
}
if (persistentProperty.isEntity()) {
if (persistentProperty.isEntity() && !writer.isUnwrapping()) {
LOG.debug("Assigning nested entity serializer for {}.", persistentProperty);