From 27e539bb187a52766f05c2fb57426aa4fad93b3a Mon Sep 17 00:00:00 2001 From: Tac Tacelosky Date: Sun, 29 Dec 2024 18:16:09 -0500 Subject: [PATCH] replace undefined $qb replace with creating it from the entity repository --- src/Autocomplete/doc/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Autocomplete/doc/index.rst b/src/Autocomplete/doc/index.rst index 33b635e3e6..08b51e8630 100644 --- a/src/Autocomplete/doc/index.rst +++ b/src/Autocomplete/doc/index.rst @@ -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])); }; ]) ;