File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
main/java/org/hibernate/type/descriptor/java
test/java/org/hibernate/orm/test/query/hql Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,6 @@ public static boolean isTemporal(JavaType<?> javaType) {
3434 }
3535
3636 public static boolean isUnknown (JavaType <?> javaType ) {
37- return javaType .getClass () == UnknownBasicJavaType .class ;
37+ return javaType == null || javaType .getClass () == UnknownBasicJavaType .class ;
3838 }
3939}
Original file line number Diff line number Diff line change 1+ /*
2+ * Hibernate, Relational Persistence for Idiomatic Java
3+ *
4+ * License: GNU Lesser General Public License (LGPL), version 2.1 or later
5+ * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
6+ */
7+ package org .hibernate .orm .test .query .hql ;
8+
9+ import org .hibernate .testing .orm .domain .StandardDomainModel ;
10+ import org .hibernate .testing .orm .junit .DomainModel ;
11+ import org .hibernate .testing .orm .junit .Jira ;
12+ import org .hibernate .testing .orm .junit .SessionFactory ;
13+ import org .hibernate .testing .orm .junit .SessionFactoryScope ;
14+ import org .junit .jupiter .api .Test ;
15+
16+ import java .util .List ;
17+
18+ import static org .junit .jupiter .api .Assertions .assertEquals ;
19+
20+ @ DomainModel (standardModels = StandardDomainModel .GAMBIT )
21+ @ SessionFactory
22+ public class InTests {
23+
24+ @ Test
25+ @ Jira ("https://hibernate.atlassian.net/browse/HHH-19698" )
26+ public void testInWithNullLiteral (SessionFactoryScope scope ) {
27+ scope .inTransaction (
28+ session -> {
29+ assertEquals (0 , session .createQuery ("select 1 where 1 in (null)" , Integer .class ).list ().size ());
30+ }
31+ );
32+ }
33+
34+ }
You can’t perform that action at this time.
0 commit comments