I believe that list
is only a default in the sense that you can use it in an each
construct like
trades.each {
println it
}
And that's because it implements Iterable. Otherwise you actually have to run the query with trades.list()
. Just using trades
refers to the DetachedCriteria object.
def activities = Activities.withCriteria {
'in'("tradeNumber", trades.list())
}