We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27e539b commit c028c19Copy full SHA for c028c19
src/Autocomplete/doc/index.rst
@@ -315,8 +315,9 @@ the consequent renders, the default ``query_builder`` will be used::
315
$builder
316
->add('food', FoodAutocompleteField::class, [
317
'query_builder' => function (EntityRepository $er) {
318
- return $er->createQueryBuilder('o')
319
- ->andWhere($er->createQueryBuilder()->expr()->notIn('o.id', [$currentFoodId]));
+ $qb = $er->createQueryBuilder('o');
+
320
+ return $qb->andWhere($qb->expr()->notIn('o.id', [$currentFoodId]));
321
};
322
])
323
;
0 commit comments