Jira issue originally created by user itoijala:
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 (datecreated DATETIME NOT NULL, dateupdated DATETIME DEFAULT NULL,
datedeleted DATETIME DEFAULT NULL, creator_id INT DEFAULT NULL, updaterid INT DEFAULT NULL,
deleter_id INT DEFAULT NULL) ENGINE = InnoDB
ALTER TABLE Blameable ADD FOREIGN KEY (creatorid) REFERENCES userusers(id)
ALTER TABLE Blameable ADD FOREIGN KEY (updaterid) REFERENCES userusers(id)
ALTER TABLE Blameable ADD FOREIGN KEY (deleterid) REFERENCES userusers(id)
Only the mapped superclass exists in the classdir. I think it should not create any tables.
Comment created by itoijala:
Example class, used to generate output.
Comment created by romanb:
Is this with ALPHA1 or the latest code from HEAD? I remember Jon making some fixes recently for mapped superclasses.
This was with ALPHA1.
Comment created by @guilhermeblanco:
Are you able to try same thing with HEAD? If it works I can definately close the issue.
This works now using HEAD.
No SQL is outputted with --dump-sql and no tables are created for the mapped superclass.
Issue was closed with resolution "Fixed"
Imported 1 attachments from Jira into https://gist.github.com/86351b113820609467db