File tree Expand file tree Collapse file tree 2 files changed +34
-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 +34
-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 .dialect .DerbyDialect ;
10+ import org .hibernate .testing .orm .domain .StandardDomainModel ;
11+ import org .hibernate .testing .orm .junit .*;
12+ import org .junit .jupiter .api .Test ;
13+
14+ import java .util .List ;
15+
16+ import static org .junit .jupiter .api .Assertions .assertEquals ;
17+
18+ @ DomainModel (standardModels = StandardDomainModel .GAMBIT )
19+ @ SessionFactory
20+ public class InTests {
21+
22+ @ Test
23+ @ Jira ("https://hibernate.atlassian.net/browse/HHH-19698" )
24+ @ SkipForDialect (dialectClass = DerbyDialect .class , reason = "Derby doesn't like null literals in the in predicate" )
25+ public void testInWithNullLiteral (SessionFactoryScope scope ) {
26+ scope .inTransaction (
27+ session -> {
28+ assertEquals (0 , session .createQuery ("select 1 where 1 in (null)" , Integer .class ).list ().size ());
29+ }
30+ );
31+ }
32+
33+ }
You can’t perform that action at this time.
0 commit comments