I have a complicated Criteria query involving a bunch of sub-selects, etc.
Buried in there is a simple test for a boolean value constructed like this:
Attempting to perform the query results in the following exception:
Note the generated query contains generatedAlias8.primary = true=true.
I tried a few variants, like builder.equal(builder.literal(true), foobar.get(Foobar_.primary)) and builder.isFalse(builder.not(foobar.get(Foobar_.primary))) but those didn't fix it.
Changing the Java property name from primary to primaree doesn't help either (thought it might be a special keyword (the MySQL column name had already been changed long ago to isprimary)).
This problem originally occurred in 5.0.7, after which I tried upgrading to 5.1.8. I have not tried 5.2.x because it's incompatible with Spring 4.3.x's HibernateJpaDialect due to the change in return type of Session.getFlushMode() and so my app won't build.
Hibernate 5.1.8 using JPA, MySQL