I'm trying to implement Doctrine column-aggregation inheritance
I copied the Yaml structure from the Doctrine guide and paste it in my schema.yml file:
Entity:
columns:
username: string(20)
password: string(16)
created_at: timestamp
updated_at: timestamp
User:
inheritance:
extends: Entity
type: column_aggregation
keyField: type
keyValue: 1
Group:
inheritance:
extends: Entity
type: column_aggregation
keyField: type
keyValue: 2
But when I use the doctrine:build-model and doctrine:build-sql commands from symfony's command line, the sql file I get contains two similar lines for creating the Entity table:
CREATE TABLE entity (id BIGINT AUTO_INCREMENT, username VARCHAR(20), password VARCHAR(16), created_at DATETIME, updated_at DATETIME, type VARCHAR(255), INDEX entity_type_idx (type), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE entity (id BIGINT AUTO_INCREMENT, username VARCHAR(20), password VARCHAR(16), created_at DATETIME, updated_at DATETIME, type VARCHAR(255), PRIMARY KEY(id)) ENGINE = INNODB;
Which ofcourse causes an error when I try to import it to my database..
Is it a build-in bug in Symfony's command-line?
-
Strange... are you up-to-date?greg0ire– greg0ire2011年11月25日 17:26:49 +00:00Commented Nov 25, 2011 at 17:26
-
I think I am.. I have symfony 1.4.11 not sure about the Doctrine versiontamir– tamir2011年11月26日 07:38:49 +00:00Commented Nov 26, 2011 at 7:38
-
Do you know of any tool other than Symfony's CLI to build the .sql from my YAML file?tamir– tamir2011年11月26日 08:01:27 +00:00Commented Nov 26, 2011 at 8:01
-
the latest version of symfony is 1.4.15 . There might have been some bugfixes in the embedded doctrine version. Please udpate. And no, I don't know any other tool.greg0ire– greg0ire2011年11月26日 09:26:17 +00:00Commented Nov 26, 2011 at 9:26
1 Answer 1
Well, it looks like it is a reported bug and it will only work in Doctrine 2
Comments
Explore related questions
See similar questions with these tags.