Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

3 participants

@relo-san

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.
ca1c649
@relo-san

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

@guilhermeblanco

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

@relo-san

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

@beberlei beberlei merged commit 8fcf2d4 into doctrine:master
@beberlei
Owner

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
View
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.