Hi, we are currently migrating our code from JavaEE 8 to Jakarta EE 10 and therefore we also migrate from Hibernate 5 to Hibernate 6. Our repository-classes mostly rely on the Criteria API. We now experience a ‘QueryException: Ordinal parameter not bound’ if the caller passes in null-reference to methods using: cb.equal(root.get(ClassXX.field), null-reference); in the WHERE clause. In Hibernate 5 this was working and seemed to produced a UNKOWN result and therefore returning an empty result (if only that condition was used). In Hibernate 6 (6.1.5) a null-value is not added to the parameterBindings in the QuerySqmImpl and therefore results in a QueryParameterException once the queryParameters are validated. The JPA 3.1 Specification for Input Parameters only states that if the input parameter is null it will yield an unkown value. UNKOWN is fine, but I would not expect an Exception here. From the code it seems that Hibernate 6.2 will throw a different message for the QueryParameterException. I will try to set-up a small project to demonstrate the behavior. regards Michael |