HHH-13959 Add nullability and uniqueness for @OneToOne with @JoinTable
This commit is contained in:
parent
038b3ce487
commit
2baa5fccdc
|
@ -3113,7 +3113,14 @@ public final class AnnotationBinder {
|
|||
propertyBinder.setCascade( cascadeStrategy );
|
||||
propertyBinder.setProperty( property );
|
||||
propertyBinder.setXToMany( true );
|
||||
propertyBinder.makePropertyAndBind();
|
||||
|
||||
final Property boundProperty = propertyBinder.makePropertyAndBind();
|
||||
if ( joinColumn != null ) {
|
||||
boundProperty.setOptional( joinColumn.nullable() && optional );
|
||||
}
|
||||
else {
|
||||
boundProperty.setOptional( optional );
|
||||
}
|
||||
}
|
||||
|
||||
protected static void defineFetchingStrategy(ToOne toOne, XProperty property) {
|
||||
|
|
Loading…
Reference in New Issue