FOSOAuthServerBundleを拡張するクライアントを作成しました。このクライアントのコードは以下の通りです:フィールドまたはディスクリミネータのカラムマッピング内のエンティティ 'Acme¥ApiBundle¥Entity¥Client'のカラム 'random_id'の重複定義
<?php
namespace Acme\ApiBundle\Entity;
use FOS\OAuthServerBundle\Entity\Client as BaseClient;
use Doctrine\ORM\Mapping as ORM;
/**
* Class Client
*
* @package Acme\ApiBundle\Entity
*
* @ORM\Table("oauth2_clients")
* @ORM\Entity
*/
class Client extends BaseClient
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
protected $name;
public function __construct()
{
parent::__construct();
}
public function setName($name)
{
$this->name = $name;
}
public function getName()
{
return $this->name;
}
}
だから、私が言ったように、私は$ランダムID(\ friendsofsymfonyの\のOAuthのサーバー・バンドル\エンティティ\ Client.php、ライン28)がFOSOAuthServerBundleを拡張します。今度はエラーが発生します:
MappingException in MappingException.php line 565: Duplicate definition of column 'random_id' on entity 'Acme\ApiBundle\Entity\Client' in a field or discriminator column mapping.
私は間違いを犯しましたか?