Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2335206

Browse filesBrowse files
herewegooweaverryan
authored andcommitted
Update doctrine.rst
1 parent ce9456c commit 2335206
Copy full SHA for 2335206

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎book/doctrine.rst

Copy file name to clipboardExpand all lines: book/doctrine.rst
+5-5Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.