Why do I get a “Null value was assigned to a property of primitive type setter of” error message when using HibernateCriteriaBuilder in Grails November 8, 2022 by Tarik According to this SO thread, the solution is to use the non-primitive wrapper types; e.g., Integer instead of int.