Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.0-ALPHA2
-
Component/s: Tools
-
Security Level: All
-
Labels:None
Description
Using the schema-tool to create the database creates a table for a mapped superclass. I think this behaviour is not desired, since the fields of the superclass also exist in the subclass tables. Running php doctrine schema-tool --create --dump-sql --classdir="<...>" generates the following output (MySql):
CREATE TABLE Blameable (date_created DATETIME NOT NULL, date_updated DATETIME DEFAULT NULL,
date_deleted DATETIME DEFAULT NULL, creator_id INT DEFAULT NULL, updater_id INT DEFAULT NULL,
deleter_id INT DEFAULT NULL) ENGINE = InnoDB
ALTER TABLE Blameable ADD FOREIGN KEY (creator_id) REFERENCES user_users(id)
ALTER TABLE Blameable ADD FOREIGN KEY (updater_id) REFERENCES user_users(id)
ALTER TABLE Blameable ADD FOREIGN KEY (deleter_id) REFERENCES user_users(id)
Only the mapped superclass exists in the classdir. I think it should not create any tables.
Example class, used to generate output.