Grails 2.x createCriteria 'or' doesn't work for nested associations
问题 It seems that in Grails 2.x, if you have a domain class association, and you try to run a createCriteria using or on that relation + another query, the or will ignore the other query and just use the results of the nested association. I realize this may be a little confusing, so here is an example: class Passenger { Long id Boolean isDriving } class Car { Long id Passenger passenger Boolean isMoving static constraints = { passenger nullable: true } } and a test: class CarIntegrationTests {