DDC-1607: Entity with eager loaded association is not found when association is null #2246

Closed
doctrinebot opened this Issue Jan 17, 2012 · 10 comments

2 participants

@doctrinebot

Jira issue originally created by user mkoonstra:

Two entities: A and B

A:
id PRIMARY
b NULLABLE

B:
id PRIMARY

Situation: A.b is null and set to eager loading (with fetch="EAGER"), find(id) is called for object A

Actual Behaviour: The record from A is not found (probably due to an INNER JOIN being used).

Expected behaviour: Entity A is loaded with b set to null (like during lazy loading).

@doctrinebot

Comment created by @guilhermeblanco:

Increasing priority

@doctrinebot

Comment created by @guilhermeblanco:

It seems to be associated with this commit:

68663fa#comments

@doctrinebot

Comment created by @guilhermeblanco:

Since it's a crash between versions, I'm increasing priority and also marking as regression.

@doctrinebot

Comment created by @beberlei:

A blocker indeed, reschedulding RC1 release until this is fixed.

@doctrinebot

Comment created by @beberlei:

Can you show us the mappings, specifically how you map A#b? Are you setting nullable=false on the join columns?

You problem could be related to:

#180
https://github.com/doctrine/doctrine2/pull/182/files

@doctrinebot

Comment created by @guilhermeblanco:

Hi,

I was unable to reproduce your issue with the comments you made so far.
Are you able to modify the attached test file into a failure state that represents your problem?

It may be easier for us to track down your problem after that.

@doctrinebot

Comment created by mkoonstra:

Trying the test case on master, but can't seem to be able to reproduce the bug (same goes for the actual problem case)

Maybe some code has changed allready? I will investigate further if I can reproduce the bug in master.

@doctrinebot

Comment created by @beberlei:

Closing as invalid, please reopen if you can reproduce, but it seems this is fixed.

@doctrinebot

Issue was closed with resolution "Invalid"

@beberlei beberlei was assigned by doctrinebot 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