2
Good afternoon.
The following error is happening:
Error: Duplicate Definition of column 'numg_usuario' on Entity 'Usuario' in a field or discriminator column Mapping.
My User class extends from Possesgrupo.
Then the User Class mapping is as follows:
 /**
  * @Table(name="ge_usuario")
  * @Entity
  */
  class Usuario extends PossuiGrupo {
  /**
   * @var integer
   *
   * @Column(name="numg_usuario", type="integer", nullable=false)
   * @Id
   * @GeneratedValue(strategy="AUTO")
   */
    protected $numgUsuario;
And within the class Has a group is like this:
 /**
     * @Entity
     * @Table(name="ge_grupo_usuario")
     */
    class PossuiGrupo extends ModelObject {
   /**
     * @Id
     * @Column(name="numg_usuario", type="integer", nullable=false)
     * @ManyToOne(targetEntity="Usuario")
     */
    protected $usuario;
   /**
     * @Id
     * @Column(name="numg_grupo", type="integer", nullable=false)
     * @ManyToOne(targetEntity="Grupo")
     */
    protected $grupo;
    public function __construct($usuario, $grupo) {
        $this->usuario = $usuario;
        $this->grupo = $grupo;
    }
Is there any way to work like this with Doctrine, and I can’t change the database structure.

You can supplement the question with the template of your database at the moment?
– Rodrigo Rigotti
Good morning, I edited the question. Thank you.
– Luis Augusto