Skip to content

Commit 95d25d8

Browse files
committed
[#1316] Moving Repository classes to Entity to be consistent with how entities are generated
1 parent e024948 commit 95d25d8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

book/doctrine.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ To do this, add the name of the repository class to your mapping definition.
720720
use Doctrine\ORM\Mapping as ORM;
721721
722722
/**
723-
* @ORM\Entity(repositoryClass="Acme\StoreBundle\Repository\ProductRepository")
723+
* @ORM\Entity(repositoryClass="Acme\StoreBundle\Entity\ProductRepository")
724724
*/
725725
class Product
726726
{
@@ -732,7 +732,7 @@ To do this, add the name of the repository class to your mapping definition.
732732
# src/Acme/StoreBundle/Resources/config/doctrine/Product.orm.yml
733733
Acme\StoreBundle\Entity\Product:
734734
type: entity
735-
repositoryClass: Acme\StoreBundle\Repository\ProductRepository
735+
repositoryClass: Acme\StoreBundle\Entity\ProductRepository
736736
# ...
737737
738738
.. code-block:: xml
@@ -743,7 +743,7 @@ To do this, add the name of the repository class to your mapping definition.
743743
<doctrine-mapping>
744744
745745
<entity name="Acme\StoreBundle\Entity\Product"
746-
repository-class="Acme\StoreBundle\Repository\ProductRepository">
746+
repository-class="Acme\StoreBundle\Entity\ProductRepository">
747747
<!-- ... -->
748748
</entity>
749749
</doctrine-mapping>
@@ -761,8 +761,8 @@ ordered alphabetically.
761761

762762
.. code-block:: php
763763
764-
// src/Acme/StoreBundle/Repository/ProductRepository.php
765-
namespace Acme\StoreBundle\Repository;
764+
// src/Acme/StoreBundle/Entity/ProductRepository.php
765+
namespace Acme\StoreBundle\Entity;
766766
767767
use Doctrine\ORM\EntityRepository;
768768
@@ -1088,7 +1088,7 @@ Of course, if you know up front that you'll need to access both objects, you
10881088
can avoid the second query by issuing a join in the original query. Add the
10891089
following method to the ``ProductRepository`` class::
10901090

1091-
// src/Acme/StoreBundle/Repository/ProductRepository.php
1091+
// src/Acme/StoreBundle/Entity/ProductRepository.php
10921092
public function findOneByIdJoinedToCategory($id)
10931093
{
10941094
$query = $this->getEntityManager()

0 commit comments

Comments
 (0)