Skip to content

Loading…

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

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

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.

@doctrinebot

Comment created by @asm89:

PR with tests and fix: #97

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.1.1 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.