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

Lines changed: 5 additions & 5 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy