Open davidkron opened 7 years ago
Just bumped into this, and it's painful because being forced to use a Closure means you lose the ability to define join types, a la:
User.where {
comments {
authored > since
}
}.join('comments', JoinType.INNER)
@jamesdh At some point I was annoyed about this as well, but I think I encountered this in earlier Grails 3.x versions. The current API of detached criteria does seem to support join types:
Have you tried this yet?
I observed inconsistent behavior and API when trying to reuse and compose DetachedCriteria instances together:
DetachedCriteria.where(DetachedCriteria)
)Tested with Grails 3.2.4
Some examples to demonstrate