[DDC-1497] Orm:generate-entities generates incorrect code when it has multiple relations with the same entity Created: 17/Nov/11 Updated: 27/May/12 Resolved: 27/May/12
|Project:||Doctrine 2 - ORM|
|Reporter:||Kéri Norbert||Assignee:||Benjamin Eberlei|
ArchLinux, PHP 5.3.8
Using the same entities, as in the cookbook, when you generate the entities, the add* methods on User, or generally, on the inverse for many type relations are incorrect, and overwrite each other, so you end up with only one add method, that is incorrectly named.
What I expected:
|Comment by venimus [ 17/Jan/12 ]|
I also reproduce that with a manyToMany relations
The misbehavior I found to be in the EntityGenerator.php on lines 706-712
the whole block should be simply
|Comment by Schyzophrenic [ 31/Mar/12 ]|
I have also reproduced the very same issue on Doctrine 2.1.4 on a Win7 environment (using Symfony2, but it is not really relevant here).
|Comment by Benjamin Eberlei [ 27/May/12 ]|
Fixed but merged only into master, since this is also a BC break.