You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to generate entities with annotation mappings using the CLI orm:convert-mapping command will throw an exception.
-- Schema to reproduce
CREATE DATABASE IF NOT EXISTS doctrine_issue;
USE doctrine_issue;
CREATE TABLE activity ( idact int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (idact)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE activity_log ( idacl int(10) unsigned NOT NULL AUTO_INCREMENT, idact int(10) unsigned NOT NULL,
PRIMARY KEY (idacl),
CONSTRAINT fk*activity_data*activity FOREIGN KEY (idact) REFERENCES activity (idact)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
// configure a simple doctrine.php file to connect and run the following CLI command:
C:>php doctrine.php orm:convert-mapping --from-database annotation .\Entities
Will throw an MappingException::duplicateFieldMapping on ActivityLog::idact, at line 1064 of class Doctrine\ORM\Mapping\ClassMetadataInfo
The text was updated successfully, but these errors were encountered:
Jira issue originally created by user alexbrina:
Trying to generate entities with annotation mappings using the CLI orm:convert-mapping command will throw an exception.
-- Schema to reproduce
CREATE DATABASE IF NOT EXISTS
doctrine_issue
;USE
doctrine_issue
;CREATE TABLE
activity
(idact
int(10) unsigned NOT NULL AUTO_INCREMENT,PRIMARY KEY (
idact
)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE
activity_log
(idacl
int(10) unsigned NOT NULL AUTO_INCREMENT,idact
int(10) unsigned NOT NULL,PRIMARY KEY (
idacl
),CONSTRAINT
fk*activity_data*activity
FOREIGN KEY (idact
) REFERENCESactivity
(idact
)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
// configure a simple doctrine.php file to connect and run the following CLI command:
C:>php doctrine.php orm:convert-mapping --from-database annotation .\Entities
Will throw an MappingException::duplicateFieldMapping on ActivityLog::idact, at line 1064 of class Doctrine\ORM\Mapping\ClassMetadataInfo
The text was updated successfully, but these errors were encountered: