Skip to content
Snippets Groups Projects
user avatar
Jared Hancock authored
This allows for things like related COUNTs and such:

```php
ThreadEntry::objects()->annotate(
    'attachment_count'=>Aggregate::COUNT('attachments')
    )
    ->filter(array('attachments__type__contains'=>'image/'))
    ->filter(array('attachment_count__gt'=>0));
```
This would find all thread entries with at least one image attached.
b2e7da58
Name Last commit Last update