瀏覽代碼

Merge pull request #2624 from roukmoute/patch-2

Replace getRootAlias with getRootAliases
Thomas 10 年之前
父節點
當前提交
57faf9072c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Resources/doc/reference/action_list.rst

+ 1 - 1
Resources/doc/reference/action_list.rst

@@ -169,7 +169,7 @@ You can customize the list query thanks to the ``createQuery`` method.
     {
         $query = parent::createQuery($context);
         $query->andWhere(
-            $query->expr()->eq($query->getRootAlias() . '.my_field', ':my_param')
+            $query->expr()->eq($query->getRootAliases()[0] . '.my_field', ':my_param')
         );
         $query->setParameter('my_param', 'my_value');
         return $query;