Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.0-BETA3
-
Component/s: Mapping Drivers
-
Security Level: All
-
Labels:None
-
Environment:Hidemysql Ver 14.14 Distrib 5.1.43, for Win32 (ia32)
PHP 5.3.1 (cli) (built: Feb 8 2010 22:11:49)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
- with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [enabled]Showmysql Ver 14.14 Distrib 5.1.43, for Win32 (ia32) PHP 5.3.1 (cli) (built: Feb 8 2010 22:11:49) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies - with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [enabled]
Description
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
Issue Links
- is referenced by
-
DDC-616
Reverse engineering with Oracle
-
Activity
| Field | Original Value | New Value |
|---|---|---|
| Affects Version/s | 2.0-BETA2 [ 10050 ] | |
| Description |
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 annotations .\Entities Will throw a MappingException::duplicateFieldMapping on ActivityLog::idact |
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 |
| Assignee | Roman S. Borschel [ romanb ] | Benjamin Eberlei [ beberlei ] |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 2.0-BETA3 [ 10060 ] | |
| Resolution | Fixed [ 1 ] |
| Workflow | jira [ 11456 ] | jira-feedback [ 14452 ] |
| Workflow | jira-feedback [ 14452 ] | jira-feedback2 [ 16316 ] |
| Workflow | jira-feedback2 [ 16316 ] | jira-feedback3 [ 18569 ] |