Upgrade to Spring Boot 3.4 Not Working @Query with boolean comparison
ajesh123 opened this issue · 1 comments
I have added below sniffet in TutorialRepository
@Query("select t from Tutorial t where t.published IS TRUE") List<Tutorial> _getTutorial();
"IS NULL" is working in JPQL, but "IS TRUE" or "IS FALSE" or "IS NOT TRUE" or "IS NOT FALSE" is not working. (Shows 500 internal server error in api)
I upgraded hibernate to 6.4.0 in pom.xml using below sniffet and tried. But no hopes.
<properties> <java.version>21</java.version> <hibernate.version>6.4.0.Final</hibernate.version> </properties>
Its working in Spring Boot 2.7.1. Could you please help?
Detailed question added in stackoverflow:
https://stackoverflow.com/questions/77616396/how-to-use-spring-boot-3-2-0-with-mysql-database-and-jparepository-query-has-bo
where t.published = true
is working. but <> true
otherwise != true
is not working. Before I have used t.published IS NOT TRUE
. So I am using (t.published is null or t.published = false)
instead.