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 734bd775bf
commit b91a7fe9fe
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 );
}
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 SelectableMapping aggregateMapping = mappingType.getAggregateMapping();
if ( aggregateMapping == null ) {
if ( values[i] == null ) {
// Skipping the update of the separator is on purpose
continue;
}
toString(
mappingType,
options,