mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-627: Unexpected Duplicate Field Mapping Exception #774
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Jun 7, 2010).
Originally assigned to: @beberlei on GitHub.
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(idactint(10) unsigned NOT NULL AUTO_INCREMENT,PRIMARY KEY (
idact)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE
activity_log(idaclint(10) unsigned NOT NULL AUTO_INCREMENT,idactint(10) unsigned NOT NULL,PRIMARY KEY (
idacl),CONSTRAINT
fk*activity_data*activityFOREIGN 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
@doctrinebot commented on GitHub (Jun 7, 2010):
@doctrinebot commented on GitHub (Jun 13, 2010):
Comment created by @beberlei:
Fixed and scheduled for BETA 3
@doctrinebot commented on GitHub (Jun 13, 2010):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Jun 2, 2011):
Comment created by cosmo:
Hi, I've got this exact issue in 2.1.0BETA1. Any idea how to work around it?