Open webdevilopers opened 10 years ago
I recognized that the error only occurs when using my custom User Model Entity Class set in zfuser.global.php. By default everything works fine.
My custom entity extends the ZfcUserDoctrineORMEntity and implements the ZfcRbac IdentityInterface:
/**
* An example of how to implement a role aware user entity.
*
* @ORM\Entity
* @ORM\Table(name="user")
*
* @author Tom Oram <tom@scl.co.uk>
*/
class User extends ZfcUserDoctrineORMEntity implements IdentityInterface
{
/**
* {@inheritDoc}
*/
public function getRoles()
{
// here goes the logic for getting roles from identity
return array('guest', 'admin');
}
}
So far I can see no reason why Doctrine would create two aliases for this one query.
It looks like a problem with extending the ZfcUserDoctrineORMEntity. It works fine when only extending the ZfcUserEntity.
Maybe the ZfcUserDoctrineORM module somehow injects the ZfcUserEntity making Doctrine resp. the repository think there are two tables which one alias each (t0 and t1)?
Installed modules:
When trying to edit an user I get the following error:
Caused by the following query:
For some reason the query uses t1 as alias for the user table but then queries on an t0 alias for the _userid.