Skip to content

Commit a4e40a5

Browse files
committed
HBX-2614 - Check isNullable() in BasicPOJOClass::isRequiredInConstructor.
Restores previous Minimal Constructors behavior lost when isNullable() check removed from core org.hibernate.mapping.Property.isOptional().
1 parent 3eaa85c commit a4e40a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

orm/src/main/java/org/hibernate/tool/internal/export/java/BasicPOJOClass.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ protected boolean isRequiredInConstructor(Property field) {
817817
return false;
818818
}
819819
if(field.getValue()!=null) {
820-
if (!field.isOptional() && (field.getValueGeneratorCreator() == null )) {
820+
if (!(field.isOptional() || field.getValue().isNullable()) && (field.getValueGeneratorCreator() == null )) {
821821
return true;
822822
} else if (field.getValue() instanceof Component) {
823823
Component c = (Component) field.getValue();

0 commit comments

Comments
 (0)