droggo opened a new issue, #14647:
URL: https://github.com/apache/grails-core/issues/14647
Having domains:
```
class Parent {
String name
static hasMany = [children: Child]
}
class Child {
String name
Related related
static belongsTo = [parent: Parent]
}
class Related {
String name
}
```
Following detached criteria could be created:
```
new DetachedCriteria(Parent).build {
createAlias 'children', 'c'
createAlias 'c.related', 'r'
isNotNull 'r.name'
}
```
But on second call to createAlias - IllegalArgumentException: Argument
[c.related] is not an association is thrown. Exactly the same code works if
standard criteria is used instead of DetachedCriteria.
Example project is here: https://github.com/droggo/GrailsSubqueries
Integration Spec to demo this problem:
https://github.com/droggo/GrailsSubqueries/blob/master/src/integration-test/groovy/error/DetachedCriteriaAliasIntegrationSpec.groovy
--
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]