DDC-1301: EXTRA_LAZY collection count throws exception on OneToMany association #1915

doctrinebot opened this Issue Jul 28, 2011 · 2 comments

2 participants


Jira issue originally created by user @asm89:

Calling count() on an EXTRA_LAZY collection throws an exception.

Notice: Undefined index: iUserId in /../vendor/doctrine/lib/Doctrine/ORM/Persisters/OneToManyPersister.php line 142

I've found that this is caused by looking up the fieldName for iUserId on the targetEntity, while it should be looked up at the sourceEntity. The current tests pass because all entities have a mapping of `id' -> $id.

Tests + fix coming up.


Comment created by @asm89:

PR with tests and fix: #97


Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.1.1 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment