sonata-project/SonataDoctrineORMAdminBundle — Issue #10: Datagrid filters : doctrine_orm_callback with join
Author: EmmanuelVella
Created: 2011-11-14 08:26:35+00:00
State: open

I get the following error when using this callback :

```
Iterate with fetch join in class Application\RealEstateBundle\Entity\Picture using association product not allowed.
```

```
function($queryBuilder, $alias, $field, $value) {
$queryBuilder->leftJoin($alias.'.pictures', 'pic');

if ((int) $value['value'] === 1) {
$queryBuilder->andWhere('pic.id IS NOT NULL');
} elseif ((int) $value['value'] === 2) {
$queryBuilder->andWhere('pic.id IS NULL');
}
}
```

I try to get all the products with / without pictures.