diff --git a/book/doctrine.rst b/book/doctrine.rst index 7749a0b76bc..cb47551ba4c 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -766,8 +766,10 @@ covered later), group, etc. For more information, see the official Querying for Objects Using Doctrine's Query Builder ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Instead of writing a DQL string, you can alternatively use a helpful object called -the ``QueryBuilder`` to build that string for you:: +Instead of writing a DQL string, you can use a helpful object called the +``QueryBuilder`` to build that string for you. This is useful when the actual query +depends on dynamic conditions, as your code soon becomes hard to read with +DQL as you start to concatenate strings:: $repository = $this->getDoctrine() ->getRepository('AppBundle:Product');