Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Make rad entity repository concrete #67

Closed
wants to merge 1 commit into from

2 participants

@gquemener
Owner

As from KnpLabs/rad-edition@759bcc4
Rad EntityRepository is the default one, it needs to be concrete or the
EntityManager won't be able to instanciate it when the user do not use
a concrete custom repository.

See
https://github.com/doctrine/doctrine2/blob/2.3.2/lib/Doctrine/ORM/EntityManager.php#L689

@gquemener gquemener Make rad entity repository concrete
As from KnpLabs/rad-edition@759bcc4
Rad EntityRepository is the default one, it needs to be concrete or the
EntityManager won't be able to instanciate it when the user do not use
a concrete custom repository.

See
https://github.com/doctrine/doctrine2/blob/2.3.2/lib/Doctrine/ORM/EntityManager.php#L689
4b76c3b
@docteurklein

ohhh yes.

@docteurklein

oooh no. After talking with @Herzult , we found out that the method getAlias uses reflection on the repository class itself, which means every querybuilder made with this concrete class will have as root alias entity.

Better to use $repository->getClassName.

Anyway, @Herzult should have sent a fix, so let's close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2013
  1. @gquemener

    Make rad entity repository concrete

    gquemener authored
    As from KnpLabs/rad-edition@759bcc4
    Rad EntityRepository is the default one, it needs to be concrete or the
    EntityManager won't be able to instanciate it when the user do not use
    a concrete custom repository.
    
    See
    https://github.com/doctrine/doctrine2/blob/2.3.2/lib/Doctrine/ORM/EntityManager.php#L689
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  Doctrine/EntityRepository.php
View
2  Doctrine/EntityRepository.php
@@ -5,7 +5,7 @@
use Doctrine\ORM\EntityRepository as BaseEntityRepository;
use Doctrine\ORM\QueryBuilder;
-abstract class EntityRepository extends BaseEntityRepository
+class EntityRepository extends BaseEntityRepository
{
public function __call($method, $arguments)
{
Something went wrong with that request. Please try again.