HHH-9710 - IllegalArgumentException passing null as parameter value with explicit TemporalType

(cherry picked from commit 7a2fbbd79a)
This commit is contained in:
Steve Ebersole 2015-11-09 22:04:10 -06:00
parent fa526f6011
commit 5169f77fb2
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ public class QueryImpl<X> extends AbstractQueryImpl<X>
public void bindValue(T value, TemporalType specifiedTemporalType) {
validateBinding( getParameterType(), value, specifiedTemporalType );
if ( Date.class.isInstance( value ) ) {
if ( value == null || Date.class.isInstance( value ) ) {
if ( name != null ) {
if ( specifiedTemporalType == DATE ) {
nativeQuery.setDate( name, (Date) value );