[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
Environment:

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



 Description   

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.



 Comments   
Comment by Benjamin Eberlei [ 14/Mar/12 ]

Fixed, now throwing an exception.

Tables without primary keys are not supported by DatabaseDriver.





[DDC-1534] ManyToMany Bidirectional Relationships require a defined "joinTable" Created: 13/Dec/11  Updated: 07/Apr/12  Resolved: 07/Apr/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Mapping Drivers
Affects Version/s: Git Master
Fix Version/s: 2.2.2

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


 Description   

In the Mapping when defining a ManyToMany Bi-Directional Association the inversedBy is required on the owning side. Without a joinTable defined, the inversedBy attribute is never read. The joinTable attribute should not be required if using the Mapping Defaults.

A quick glance at the code showed this in Annotations/XML/YML mappings



 Comments   
Comment by Benjamin Eberlei [ 17/Dec/11 ]

I don't get it, can you point me to some lines?

Comment by Benjamin Eberlei [ 07/Apr/12 ]

Found, fixed.





Generated at Thu Sep 03 07:07:27 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.