You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to edit an user I get the following error:
Column not found: 1054 Unknown column 't0.user_id' in 'where clause'
Caused by the following query:
SELECT t1.username AS username2, t1.email AS email3, t1.display_name AS display_name4, t1.password AS password5, t1.state AS state6, t1.user_id AS user_id7 FROM user t1 WHERE t0.user_id = ?' with params ["17"]:
For some reason the query uses t1 as alias for the user table but then queries on an t0 alias for the user_id.
The text was updated successfully, but these errors were encountered:
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 <[email protected]> */class User extends ZfcUserDoctrineORMEntity implements IdentityInterface
{
/** * {@inheritDoc} */publicfunctiongetRoles()
{
// here goes the logic for getting roles from identityreturnarray('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 user_id.
The text was updated successfully, but these errors were encountered: