Skip to content

Commit 2335206

Browse files
herewegooweaverryan
authored andcommitted
Update doctrine.rst
1 parent ce9456c commit 2335206

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

book/doctrine.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -725,8 +725,9 @@ or using Doctrine's Query Builder.
725725
Querying for Objects with DQL
726726
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
727727

728-
Instead of using the ``QueryBuilder``, you can alternatively write the queries
729-
directly using DQL::
728+
Imagine that you want to query for products, but only return products that
729+
cost more than ``19.99``, ordered from cheapest to most expensive. You can use
730+
Doctrine's native SQL-like language called DQL to do query for this::
730731

731732
$em = $this->getDoctrine()->getManager();
732733
$query = $em->createQuery(
@@ -752,9 +753,8 @@ covered later), group, etc. For more information, see the official
752753
Querying for Objects Using Doctrine's Query Builder
753754
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
754755

755-
Imagine that you want to query for products, but only return products that
756-
cost more than ``19.99``, ordered from cheapest to most expensive. You can use
757-
Doctrine's ``QueryBuilder`` for this::
756+
Instead of writing a DQL string, you can alternatively use a helpful object called
757+
the ``QueryBuilder`` to build that string for you::
758758

759759
$repository = $this->getDoctrine()
760760
->getRepository('AppBundle:Product');

0 commit comments

Comments
 (0)