[DDC-1692] doctrine:mapping:convert on entities without primary key Created: 09/Mar/12  Updated: 14/Mar/12  Resolved: 14/Mar/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Tools
Affects Version/s: 2.1.6
Fix Version/s: 2.2.2

Type: Bug Priority: Minor
Reporter: david Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None

Ubuntu Server, PHP: 5.3.6-13ubuntu3.6, Symfony 2.0.11


It issn't possible to use some of the Doctrine tools on entities without primary key.
Following error appears:

PHP Fatal error: Call to a member function getColumns() on a non-object in /media/sf_webdev-shared/Symfony/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php on line 133

DatabaseDriver tries to get primary key columns without checking if there is any primary key.

Comment by Benjamin Eberlei [ 14/Mar/12 ]

Fixed, now throwing an exception.

Tables without primary keys are not supported by DatabaseDriver.

Generated at Wed Oct 07 00:35:04 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.