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