Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Can't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
entity:
columns:
id:
type: integer(4)
primary: true
notnull: true
name:
type: string(200)
company:
inheritance:
extends: entity
type: column_aggregation
keyField: type
keyValue: company
person:
inheritance:
extends: entity
type: column_aggregation
keyField: type
keyValue: person
generates 3 times a create table statement for entity when i call "generate-sql" via the CLI command:
CREATE TABLE entity (id INT, name VARCHAR(200), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ENGINE = InnoDB;
CREATE TABLE entity (id INT, name VARCHAR(200), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ENGINE = InnoDB;
CREATE TABLE entity (id INT, name VARCHAR(200), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ENGINE = InnoDB;
I had a look at this and we have no real good way to fix it as the whole inheritance implementation in Doctrine 1 is severely flawed. This works properly in Doctrine 2 though.