Skip to content

Add missing parenthesis for methods and a few minor tweaks #7112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 5, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,10 @@ Take a look at the previous example in more detail:
responsible for the process of persisting objects to, and fetching objects
from, the database.

* **line 17** The ``persist($product)`` call tells Doctrine to "manage" the
* **line 18** The ``persist($product)`` call tells Doctrine to "manage" the
``$product`` object. This does **not** cause a query to be made to the database.

* **line 18** When the ``flush()`` method is called, Doctrine looks through
* **line 21** When the ``flush()`` method is called, Doctrine looks through
all of the objects that it's managing to see if they need to be persisted
to the database. In this example, the ``$product`` object's data doesn't
exist in the database, so the entity manager executes an ``INSERT`` query,
Expand Down Expand Up @@ -630,7 +630,7 @@ Once you have a repository object, you can access all sorts of helpful methods::
Of course, you can also issue complex queries, which you'll learn more
about in the :ref:`doctrine-queries` section.

You can also take advantage of the useful ``findBy`` and ``findOneBy`` methods
You can also take advantage of the useful ``findBy()`` and ``findOneBy()`` methods
to easily fetch objects based on multiple conditions::

$repository = $this->getDoctrine()->getRepository('AppBundle:Product');
Expand Down Expand Up @@ -689,7 +689,7 @@ Updating an object involves just three steps:

#. fetching the object from Doctrine;
#. modifying the object;
#. calling ``flush()`` on the entity manager
#. calling ``flush()`` on the entity manager.

Notice that calling ``$em->persist($product)`` isn't necessary. Recall that
this method simply tells Doctrine to manage or "watch" the ``$product`` object.
Expand Down Expand Up @@ -780,7 +780,7 @@ DQL as you start to concatenate strings::
$repository = $this->getDoctrine()
->getRepository('AppBundle:Product');

// createQueryBuilder automatically selects FROM AppBundle:Product
// createQueryBuilder() automatically selects FROM AppBundle:Product
// and aliases it to "p"
$query = $repository->createQueryBuilder('p')
->where('p.price > :price')
Expand Down