HHH-15842 Convert simple foreign key values before binding

This commit is contained in:
Kacper Koniuszy 2022-12-20 19:14:01 +01:00 committed by Christian Beikov
parent f9fd97fe28
commit 99186e1a37
1 changed files with 3 additions and 3 deletions

View File

@ -424,7 +424,7 @@ public class SimpleForeignKeyDescriptor implements ForeignKeyDescriptor, BasicVa
@Override
public Object disassemble(Object value, SharedSessionContractImplementor session) {
return value;
return getJdbcMapping().convertToRelationalValue( value );
}
@Override
@ -460,7 +460,7 @@ public class SimpleForeignKeyDescriptor implements ForeignKeyDescriptor, BasicVa
@Override
public void breakDownJdbcValues(Object domainValue, JdbcValueConsumer valueConsumer, SharedSessionContractImplementor session) {
valueConsumer.consume( domainValue, keySide.getModelPart() );
valueConsumer.consume( disassemble( domainValue, session ), keySide.getModelPart() );
}
@Override
@ -506,7 +506,7 @@ public class SimpleForeignKeyDescriptor implements ForeignKeyDescriptor, BasicVa
int offset,
JdbcValuesConsumer valuesConsumer,
SharedSessionContractImplementor session) {
valuesConsumer.consume( offset, value, targetSide.getModelPart().getJdbcMapping() );
valuesConsumer.consume( offset, disassemble( value, session ), targetSide.getModelPart().getJdbcMapping() );
return getJdbcTypeCount();
}