HHH-13959 Add nullability and uniqueness for @OneToOne with @JoinTable
This commit is contained in:
parent
5c92d515c6
commit
27b065c574
|
@ -3113,7 +3113,14 @@ public final class AnnotationBinder {
|
||||||
propertyBinder.setCascade( cascadeStrategy );
|
propertyBinder.setCascade( cascadeStrategy );
|
||||||
propertyBinder.setProperty( property );
|
propertyBinder.setProperty( property );
|
||||||
propertyBinder.setXToMany( true );
|
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) {
|
protected static void defineFetchingStrategy(ToOne toOne, XProperty property) {
|
||||||
|
|
Loading…
Reference in New Issue