HHH-9710 - IllegalArgumentException passing null as parameter value with explicit TemporalType
(cherry picked from commit 7a2fbbd79a
)
This commit is contained in:
parent
fa526f6011
commit
5169f77fb2
|
@ -253,7 +253,7 @@ public class QueryImpl<X> extends AbstractQueryImpl<X>
|
||||||
public void bindValue(T value, TemporalType specifiedTemporalType) {
|
public void bindValue(T value, TemporalType specifiedTemporalType) {
|
||||||
validateBinding( getParameterType(), value, specifiedTemporalType );
|
validateBinding( getParameterType(), value, specifiedTemporalType );
|
||||||
|
|
||||||
if ( Date.class.isInstance( value ) ) {
|
if ( value == null || Date.class.isInstance( value ) ) {
|
||||||
if ( name != null ) {
|
if ( name != null ) {
|
||||||
if ( specifiedTemporalType == DATE ) {
|
if ( specifiedTemporalType == DATE ) {
|
||||||
nativeQuery.setDate( name, (Date) value );
|
nativeQuery.setDate( name, (Date) value );
|
||||||
|
|
Loading…
Reference in New Issue