Skip to content

Commit e1042c2

Browse files
committed
HHH-17151 Avoid setting explicit temporal bind type for null values
1 parent b35c783 commit e1042c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public void setBindValues(
322322

323323
private void setExplicitTemporalPrecision(TemporalType precision) {
324324
explicitTemporalPrecision = precision;
325-
if ( bindType == null || JavaTypeHelper.isTemporal( determineJavaType( bindType ) ) ) {
325+
if ( bindType != null && JavaTypeHelper.isTemporal( determineJavaType( bindType ) ) ) {
326326
bindType = BindingTypeHelper.INSTANCE.resolveTemporalPrecision( precision, bindType, sessionFactory );
327327
}
328328
}

0 commit comments

Comments
 (0)