Skip to content

DDC-627: Unexpected Duplicate Field Mapping Exception #5136

Closed
doctrinebot opened this Issue Jun 7, 2010 · 4 comments

2 participants

@doctrinebot

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) 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

@doctrinebot

Comment created by @beberlei:

Fixed and scheduled for BETA 3

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by cosmo:

Hi, I've got this exact issue in 2.1.0BETA1. Any idea how to work around it?

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.0-BETA3 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.