Skip to content

Commit 27e539b

Browse files
authored
replace undefined $qb
replace with creating it from the entity repository
1 parent 507c89c commit 27e539b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Autocomplete/doc/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ the consequent renders, the default ``query_builder`` will be used::
316316
->add('food', FoodAutocompleteField::class, [
317317
'query_builder' => function (EntityRepository $er) {
318318
return $er->createQueryBuilder('o')
319-
->andWhere($qb->expr()->notIn('o.id', [$currentFoodId]));
319+
->andWhere($er->createQueryBuilder()->expr()->notIn('o.id', [$currentFoodId]));
320320
};
321321
])
322322
;

0 commit comments

Comments
 (0)