Skip to content

Commit

Permalink
Add QueryBuilder vs DQL section
Browse files Browse the repository at this point in the history
Describe difference between QueryBuilder and DQL usage
  • Loading branch information
bocharsky-bw committed Aug 19, 2015
1 parent 6fc096e commit 122290d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions book/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,14 @@ normal ``Query`` object, which can be used to get the result of the query.
For more information on Doctrine's Query Builder, consult Doctrine's
`Query Builder`_ documentation.

Query Builder vs DQL
~~~~~~~~~~~~~~~~~~~~

When the actual query depends on dynamic conditions, your code soon becomes hard
to read as you start to concatenate strings. In these cases, it's better to use
the Doctrine QueryBuilder which provides a fluent interface to dynamically add
every part of the query.

.. _book-doctrine-custom-repository-classes:

Custom Repository Classes
Expand Down

0 comments on commit 122290d

Please sign in to comment.