-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed as not planned
Closed as not planned
Copy link
Labels
for: external-projectFor an external project and not something we can fixFor an external project and not something we can fix
Description
kotlin
Spring boot 3.3.2
Spring data jpa 3.3.2 (hibernate 6.5.2)
QueryDSL 5.1.0
java.lang.NullPointerException: Cannot invoke "org.hibernate.type.descriptor.java.JavaType.isInstance(Object)" because the return value of "org.hibernate.query.sqm.SqmExpressible.getExpressibleJavaType()" is null
I used Expressions.nullExpression() with case builder in select clause as below.
val myCase = QMyEntity.myEntity.field1.`when`("count").then(1).otherwise(Expressions.nullExpression())
(field1 field type is String)
return from(QMyEntity.myEntity)
.select(myCase.count()`as`("alias") ....
In Spring boot 2.7.14 with querydsl 5.0.0 it works well with below query.
select count(case when myentity.field1=? then ? else null end) as col_1_0_, ....
from ...
How can I fix this issue in Spring data jpa 3.3.2 ?
Metadata
Metadata
Assignees
Labels
for: external-projectFor an external project and not something we can fixFor an external project and not something we can fix