HHH-17257 ElementCollection is missing elements after update if embeddable type has primitive columns marked as nullable

This commit is contained in:
Andrea Boriero 2023-09-28 13:06:23 +02:00 committed by Andrea Boriero
parent b95035c950
commit 30aec8b8ff
1 changed files with 2 additions and 2 deletions

View File

@ -385,7 +385,7 @@ public class EmbeddableMappingTypeImpl extends AbstractEmbeddableMapping impleme
length = column.getLength();
precision = column.getPrecision();
scale = column.getScale();
nullable = column.isNullable();
nullable = bootPropertyDescriptor.isOptional() && column.isNullable() ;
selectablePath = basicValue.createSelectablePath( column.getQuotedName( dialect ) );
}
else {
@ -393,7 +393,7 @@ public class EmbeddableMappingTypeImpl extends AbstractEmbeddableMapping impleme
length = null;
precision = null;
scale = null;
nullable = true;
nullable = bootPropertyDescriptor.isOptional();
selectablePath = basicValue.createSelectablePath( bootPropertyDescriptor.getName() );
}
attributeMapping = MappingModelCreationHelper.buildBasicAttributeMapping(