Using Symfony 4.1, SonataUserBundle with FOSUserBundle (Current)
Followed the instructions, created wrapper class for User, added ORM tablename hint as well.
namespace App\Application\Sonata\UserBundle\Entity;
use Sonata\UserBundle\Entity\BaseUser as BaseUser;
use Doctrine\ORM\Mapping as ORM;
/**
* This file has been generated by the SonataEasyExtendsBundle.
* @ORM\Entity(name="aegis_user")
* @link https://sonata-project.org/easy-extends
*
* References:
* @link http://www.doctrine-project.org/projects/orm/2.0/docs/reference/working-with-objects/en
*/
class User extends BaseUser
{
/**
* @var int $id
*/
protected $id;
/**
* Get id.
*
* @return int $id
*/
public function getId()
{
return $this->id;
}
}
However, the table names generated (doctrine migration) are still fos_user_user, fos_user_group etc.
$this->addSql('CREATE TABLE fos_user_group (id INT ...
$this->addSql('CREATE TABLE fos_user_user (id INT ...
$this->addSql('CREATE TABLE fos_user_user_group (user_id INT ...
I need the table name prefix at least to change to xxx_user, xxx_group.
How do I change the names of the tables that FosUserBundle generates without modifying the bundle code ?
Thanks.