Small update:

Not working:
   Predicate predicate = criteriaBuilder.isFalse(itemRoot.get("testFlag"));

Working:
   Predicate predicate = criteriaBuilder.equal(itemRoot.get("testFlag"), 
Boolean.FALSE);


Ulrich schrieb am Dienstag, 30. November 2021 um 17:23:40 UTC+1:

> Hi,
> congratulations for the new H2 release!!
>
> I tested the new release and have a problem with JPA/hibernate.
> When I use an entity with a boolean field and I use this field in a 
> predicate of a query I get the exception:
> org.h2.jdbc.JdbcSQLSyntaxErrorException: Values of types "BOOLEAN" and 
> "INTEGER" are not comparable
>
> The test runs fine with H2 1.4.200.
>
> Attached you find the small test case.
>
> I use the following hibernate dependency:
>         <dependency>
>             <groupId>org.hibernate</groupId>
>             <artifactId>hibernate-core</artifactId>
>             <version>5.4.30.Final</version>
>         </dependency>
>
> Can you please check if if's a regression or if I made a mistake?
> Thanks!
> Ulrich
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/c736f8f2-d372-4978-b715-2df776a49c05n%40googlegroups.com.

Reply via email to