Skip to content

Commit 9837975

Browse files
committed
minor #7112 Add missing parenthesis for methods and a few minor tweaks (bocharsky-bw)
This PR was merged into the 2.7 branch. Discussion ---------- Add missing parenthesis for methods and a few minor tweaks Commits ------- 1f6cc62 Add missing parenthesis for methods and a few minor tweaks
2 parents 16f5c76 + 1f6cc62 commit 9837975

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doctrine.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,10 @@ Take a look at the previous example in more detail:
537537
responsible for the process of persisting objects to, and fetching objects
538538
from, the database.
539539

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

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

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

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

690690
#. fetching the object from Doctrine;
691691
#. modifying the object;
692-
#. calling ``flush()`` on the entity manager
692+
#. calling ``flush()`` on the entity manager.
693693

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

783-
// createQueryBuilder automatically selects FROM AppBundle:Product
783+
// createQueryBuilder() automatically selects FROM AppBundle:Product
784784
// and aliases it to "p"
785785
$query = $repository->createQueryBuilder('p')
786786
->where('p.price > :price')

0 commit comments

Comments
 (0)