Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDC-627: Unexpected Duplicate Field Mapping Exception #5136

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

DDC-627: Unexpected Duplicate Field Mapping Exception #5136

doctrinebot opened this issue Jun 7, 2010 · 4 comments
Assignees
Labels
Milestone

Comments

@doctrinebot
Copy link

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
Copy link
Author

@doctrinebot
Copy link
Author

Comment created by @beberlei:

Fixed and scheduled for BETA 3

@doctrinebot
Copy link
Author

Issue was closed with resolution "Fixed"

@doctrinebot
Copy link
Author

Comment created by cosmo:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants