Skip to content

Commit c028c19

Browse files
authored
Update index.rst
1 parent 27e539b commit c028c19

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Autocomplete/doc/index.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,9 @@ the consequent renders, the default ``query_builder`` will be used::
315315
$builder
316316
->add('food', FoodAutocompleteField::class, [
317317
'query_builder' => function (EntityRepository $er) {
318-
return $er->createQueryBuilder('o')
319-
->andWhere($er->createQueryBuilder()->expr()->notIn('o.id', [$currentFoodId]));
318+
$qb = $er->createQueryBuilder('o');
319+
320+
return $qb->andWhere($qb->expr()->notIn('o.id', [$currentFoodId]));
320321
};
321322
])
322323
;

0 commit comments

Comments
 (0)