HHH-17695 Skip rendering null nested JSON aggregate embeddables

This commit is contained in:
Marco Belladelli 2024-02-07 10:40:06 +01:00
parent d865ec9e36
commit 46dffe3336
No known key found for this signature in database
GPG Key ID: D1D0C3030AE3AA35
1 changed files with 4 additions and 4 deletions

View File

@ -70,13 +70,13 @@ public class JsonHelper {
toString( attributeMapping.getMappedType(), values[i], options, appender ); toString( attributeMapping.getMappedType(), values[i], options, appender );
} }
else if ( attributeMapping instanceof EmbeddedAttributeMapping ) { else if ( attributeMapping instanceof EmbeddedAttributeMapping ) {
if ( values[i] == null ) {
// Skipping the update of the separator is on purpose
continue;
}
final EmbeddableMappingType mappingType = (EmbeddableMappingType) attributeMapping.getMappedType(); final EmbeddableMappingType mappingType = (EmbeddableMappingType) attributeMapping.getMappedType();
final SelectableMapping aggregateMapping = mappingType.getAggregateMapping(); final SelectableMapping aggregateMapping = mappingType.getAggregateMapping();
if ( aggregateMapping == null ) { if ( aggregateMapping == null ) {
if ( values[i] == null ) {
// Skipping the update of the separator is on purpose
continue;
}
toString( toString(
mappingType, mappingType,
options, options,