borinquenkid commented on PR #16836:
URL: https://github.com/apache/grails-core/pull/16836#issuecomment-6670848398
Pushed 5f502680d3. By thread:
Nested criteria: AssociationQueryHandler dispatches the criteria of an
association block with the associated entity, and keeps the entity it was given
when the association targets a relationship entity. owner { isNull('kind') }
now tests the owner's plain property, and owner { isNull('address') } tests the
owner's association. Features for both, with isNotNull, and one for an
association of the root entity beside a nested block. This is also james's
comment on the property resolved on the root.
Upgrade note: section 90 of the Grails 8 upgrade guide, with isNull and
isNotNull, the finder and where forms, to-many, nested blocks, deleteAll and
updateAll, and how to get the earlier rows back.
Embedded: the relationship pattern excludes Embedded as well as Basic.
Without the exclusion an embedded component's null test fails in the cast of
its entity, as james found; a feature runs isNull and isNotNull on one.
Tests: the reversed pattern of a bidirectional many-to-one, a to-many, a
basic collection, an association to a relationship entity (Movie.cast) and
isNull and isNotNull on from and to of CastMember. I mutated the nested
dispatch, the Embedded exclusion and the relationship entity guard, and a
feature fails for each. The GString nit is done.
I did not add the where { owner.address == null } form: in the spec the
where closure did not resolve the nested path, so the nested block form carries
both cases.
On #16583: its copy of this change is for 9.0.x; it should be dropped when
this one merges up.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]