>
> I suspect using your criteria like that:
> ...
> def fetchAllDone = criteria.add(Task.done EQ true).list
> ...
> is the right way?
Certainly, as long as your `criteria` uses the default alias ("root"). If you have something like this:
```
val t = this AS "t"
def criteria = t.criteria.addOrder(t.createdAt ASC)
```
then you would have to refer to that `t` object instead of `Task`:
```
def fetchAllDone = criteria.add(t.done).list()
```
BTW, if `Task.done` resolves to BooleanField, then you can safely omit the `EQ true` part -- it should resolve to predicate implicitly.
Best regards,
Boris Okunskiy