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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user