Skip to content

Commit

Permalink
replace undefined $qb
Browse files Browse the repository at this point in the history
replace with creating it from the entity repository
  • Loading branch information
tacman authored Dec 29, 2024
1 parent 507c89c commit 27e539b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Autocomplete/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ the consequent renders, the default ``query_builder`` will be used::
->add('food', FoodAutocompleteField::class, [
'query_builder' => function (EntityRepository $er) {
return $er->createQueryBuilder('o')
->andWhere($qb->expr()->notIn('o.id', [$currentFoodId]));
->andWhere($er->createQueryBuilder()->expr()->notIn('o.id', [$currentFoodId]));
};
])
;
Expand Down

0 comments on commit 27e539b

Please sign in to comment.