jdaugherty opened a new pull request, #438:
URL: https://github.com/apache/grails-intellij-plugin/pull/438
From GORM 4 on, where queries on a domain class come from the GormEntity
trait, and every GORM from 6.1 to Apache 8 declares where, whereAny, whereLazy,
find and findAll(Closure) without @DelegatesTo. GORM runs the closure against a
DetachedCriteria of the domain class, delegate first (GormStaticApi#where), but
the IDE saw no delegate at all, so setAlias, eq, or and the other criteria
methods neither resolved nor completed in Person.where { }, and @CompileStatic
code reported them as errors.
DetachedCriteriaDelegatesToProvider now gives those closures a
DetachedCriteria<Domain> delegate, DELEGATE_FIRST. Below GORM 4 the where
methods are light dynamic methods whose closures already get the criteria
methods from DetachedCriteriaClosureMemberProvider, so they are left alone. The
where query detection WhereQueryClosureMemberContributor used moves to
DetachedCriteriaUtil so both share it.
The GormWhereQueryTest stubs declared @DelegatesTo(DetachedCriteria) on
GormEntity, which real GORM never did and which hid this; they now match the
GORM signatures.
--
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]