silverstripe/silverstripe-cms — comment on commit d1581c2b9ba0edde03677414f1d556a30580f707
File: code/controllers/AssetAdmin.php line 107
By chillu:

@sminnee In this specific case, using OR connectives in a single statement.

```
$list->filter('Name.Endswith', $exts); // will produce AND connected statements
$list->filterAny('Name.Endswith', $exts); // one way to solve it, we already have DataQuery->whereAny()
$list->filter('Name.Endswith', $exts, DataList::OR); // another way, although that might become tricky in terms of arguments vs. flags
```

But more generally, two other options:
- Set global connective to OR rather than AND on a DataList instance. Already possible through SQLQuery->useConjunction()/useDisjunction(), but not exposed on DataList (possibly to keep the API clean?)
- Set grouped connectives. See Django API: https://docs.djangoproject.com/en/1.3/topics/db/queries/#complex-lookups-with-q-objects