Clase Users
Código PHP:
/**
*
* @ORM\ManyToMany(targetEntity="Roles")
* @ORM\JoinTable(name="user_role",
* joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="role_id", referencedColumnName="id")}
* )
*/
protected $user_roles;
public function __construct()
{
$this->user_roles = new DoctrineCommonCollectionsArrayCollection();
}
Código PHP:
/**
* @ORM\ManyToMany(targetEntity="Users", mappedBy="user_roles")
*/
protected $users;
The field TMK\AdminBundle\Entity\Roles#users is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity TMK\AdminBundle\Entity\Users#user_roles does not contain the required 'inversedBy=users' attribute.
¿Alguien ve el problema?