Delete application / Sonata / UserBundle / Resources / config / doctrine first
and then change Entity / User.php and Entity / Group.php to annotation type:
<?php namespace Application\Sonata\UserBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Sonata\UserBundle\Entity\BaseUser as BaseUser; class User extends BaseUser { protected $id; protected $test; }
<?php namespace Application\Sonata\UserBundle\Entity; use Sonata\UserBundle\Entity\BaseGroup as BaseGroup; use Doctrine\ORM\Mapping as ORM; class Group extends BaseGroup { protected $id; }
At the end, you should enter: php app / console doctrine: schema: update --force, and everything should work beautifully.
source share