Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Update en/reference/query-builder.rst #143

merged 1 commit into from

3 participants


Adding note for $append parameter of QueryBuilder::add() method.

@relo-san relo-san Update en/reference/query-builder.rst
Adding note for $append parameter of QueryBuilder::add() method.

I assumed that the documentation should reflect the actual behavior, but maybe I'm wrong and in this case it is better to fix the code according to the documentation.

Now $append param of QueryBuilder::add() has no effect for where and having parts.

In example:
$query->add('where', 'u.some = ?1');
$query->add('where', 'u.other = ?2', true);
will result in the loss of condition u.some = ?1


It sounds like a bug to me at initial glance. Please open a bug report for verification


Ok. I'm posted bug report DDC-2191.

@beberlei beberlei merged commit 8fcf2d4 into doctrine:master

Its right, where() and having() use objects that need to be modified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 7, 2012
  1. @relo-san

    Update en/reference/query-builder.rst

    relo-san authored
    Adding note for $append parameter of QueryBuilder::add() method.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  en/reference/query-builder.rst
3  en/reference/query-builder.rst
@@ -500,7 +500,8 @@ of DQL. It takes 3 parameters: ``$dqlPartName``, ``$dqlPart`` and
a string or any instance of ``Doctrine\ORM\Query\Expr\*``
- ``$append``: Optional flag (default=false) if the ``$dqlPart``
should override all previously defined items in ``$dqlPartName`` or
- not
+ not (no effect on the ``where`` and ``having`` DQL query parts,
+ which always override all previously defined items)
Something went wrong with that request. Please try again.