WRT documentation, seehttps://docs.jboss.org/hibernate/orm/6.2/userguide/html_single/Hibernate_User_Guide.html#hql-relational-comparisons To expand a bit, while we discourage flags/settings, I think this is a case where one should be added (if this feature is added at all). The approach in the initial PRs is simply not one we will accept. 6.x added much better validation of provided queries and this undoes that for these cases. The PRs simply accept ANY literals as “coercible” to the other type which is just not acceptable. This would need to valid that this is actually the case. Here, specifically, that would mean actually doing the coercion which is clearly a performance impact. We’d prefer to not pass the performance overhead on to all users who are doing TheRightThing - hence the setting. |