File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -744,15 +744,15 @@ ordered alphabetically.
744
744
{
745
745
public function findAllOrderedByName()
746
746
{
747
- return $this->getManager ()
747
+ return $this->getEntityManager ()
748
748
->createQuery('SELECT p FROM AcmeStoreBundle:Product p ORDER BY p.name ASC')
749
749
->getResult();
750
750
}
751
751
}
752
752
753
753
.. tip ::
754
754
755
- The entity manager can be accessed via ``$this->getManager () ``
755
+ The entity manager can be accessed via ``$this->getEntityManager () ``
756
756
from inside the repository.
757
757
758
758
You can use this new method just like the default finder methods of the repository::
@@ -1065,7 +1065,7 @@ following method to the ``ProductRepository`` class::
1065
1065
// src/Acme/StoreBundle/Repository/ProductRepository.php
1066
1066
public function findOneByIdJoinedToCategory($id)
1067
1067
{
1068
- $query = $this->getManager ()
1068
+ $query = $this->getEntityManager ()
1069
1069
->createQuery('
1070
1070
SELECT p, c FROM AcmeStoreBundle:Product p
1071
1071
JOIN p.category c
You can’t perform that action at this time.
0 commit comments