HHH-18709 Use path to infer criteria value-bind parameter type on `set`
This commit is contained in:
parent
2fa1765f5c
commit
d433133946
|
@ -180,7 +180,9 @@ public class SqmUpdateStatement<T>
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <Y, X extends Y> SqmUpdateStatement<T> set(Path<Y> attribute, X value) {
|
public <Y, X extends Y> SqmUpdateStatement<T> set(Path<Y> attribute, X value) {
|
||||||
applyAssignment( (SqmPath<Y>) attribute, (SqmExpression<? extends Y>) nodeBuilder().value( value ) );
|
final SqmCriteriaNodeBuilder nodeBuilder = (SqmCriteriaNodeBuilder) nodeBuilder();
|
||||||
|
final SqmPath<Y> sqmAttribute = (SqmPath<Y>) attribute;
|
||||||
|
applyAssignment( sqmAttribute, nodeBuilder.value( value, sqmAttribute ) );
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,9 +200,9 @@ public class SqmUpdateStatement<T>
|
||||||
expression = (SqmExpression) value;
|
expression = (SqmExpression) value;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
expression = (SqmExpression) nodeBuilder().value( value );
|
final SqmCriteriaNodeBuilder nodeBuilder = (SqmCriteriaNodeBuilder) nodeBuilder();
|
||||||
|
expression = nodeBuilder.value( value, sqmPath );
|
||||||
}
|
}
|
||||||
assertAssignable( null, sqmPath, expression, nodeBuilder() );
|
|
||||||
applyAssignment( sqmPath, expression );
|
applyAssignment( sqmPath, expression );
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue