I'm using Symfony 2.1 RC1and FOSUserbundleon a Windows server with PHP 5.3.13.
I followed the instructions here , but Doctrine does not create fields in the database for properties inherited from the base class of the FOS user (only fields from my class).
Attempting to log in using the FOS login form gives an error:
Unrecognized field: usernameCanonical
I have the following Doctrine configuration:
doctrine:
dbal:
driver: %database_driver%
host: %database_host%
port: %database_port%
dbname: %database_name%
user: %database_user%
password: %database_password%
charset: UTF8
orm:
auto_generate_proxy_classes: %kernel.debug%
auto_mapping: true
And the configuration of the FOSUserBundle looks like this:
fos_user:
db_driver: orm
firewall_name: main
user_class: SP\PickList\UserBundle\Entity\User
My custom object:
namespace SP\PickList\UserBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\UserBundle\Document\User as BaseUser;
class User extends BaseUser
{
protected $id;
public function getId()
{
return $this->id;
}
}
Thanks for any help,
James scam
source
share