2
我想要做的就是從映射超類擴展一個表繼承類,但是當我嘗試更新的方案,我去以下錯誤:主義單表繼承從擴展映射的超
[Doctrine\DBAL\Schema\SchemaException]
An index with name 'uniq_efe84ad134ecb4e6' was already defined on table 'article_article'.
我層次:
內容(mappedSuperClass)< - 第(SingleTableInheritance)< - MyArticle
類:
abstract class Content
{
protected $id;
public function getId()
{
return $this->id;
}
}
class Article extends Content
{
}
class MyArticle extends Article
{
}
映射:
Content:
type: mappedSuperclass
id:
id:
type: integer
id: true
generator:
strategy: AUTO
Article:
type: entity
table: article_article
inheritanceType: SINGLE_TABLE
discriminatorColumn:
name: discr
type: string
discriminatorMap:
article: Article
my_article: MyArticle
MyArticle:
type: entity
請告訴我錯在這裏?