i use the following in a subscriber which is used inside a collection (in a form):

```
            'query_builder' => function(EntityRepository $er) use ($data) {
                return $er->createQueryBuilder('pac')->where('pac.bookingAppointment = :bookingAppointment')->setParameter('bookingAppointment', $data);
            }
```

since sf 2.1.5 is something wrong with the used closure.. when i call it twice and $data has changed, i get the same result..