-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collection is hydrated as empty if first row contains nulls from a leftJoin #9807
Labels
Comments
Found #9230, but I don't know if that is actually similar, or only looks similar but is a different problem. 🤔 |
popov-a-e
added a commit
to popov-a-e/orm
that referenced
this issue
Jun 28, 2022
…e hydration complete
popov-a-e
added a commit
to popov-a-e/orm
that referenced
this issue
Jul 1, 2022
…ydration is complete If ObjectHydrator faces an empty row to an uninitialized collection, it initializes it, to prevent it from querying again (DDC-1526). However, if that row is the first but not the only in the collection, the next rows will be ignored, as the collection will be considered "existed", and "existed" collections are only replaced if REFRESH hint is present. To prevent it, we defer initialization to the end of the hydration. Fixes doctrineGH-9807
popov-a-e
added a commit
to popov-a-e/orm
that referenced
this issue
Jul 1, 2022
popov-a-e
added a commit
to popov-a-e/orm
that referenced
this issue
Jul 1, 2022
…ydrator If ObjectHydrator faces an empty row to an uninitialized collection, it initializes it, to prevent it from querying again (DDC-1526). However, if that row is the first but not the only in the collection, the next rows will be ignored, as the collection will be considered "existed", and "existed" collections are only replaced if REFRESH hint is present. To prevent it, we defer initialization to the end of the hydration. Fixes doctrineGH-9807
popov-a-e
added a commit
to popov-a-e/orm
that referenced
this issue
Jul 1, 2022
If ObjectHydrator faces an empty row to an uninitialized collection, it initializes it, to prevent it from querying again (DDC-1526). However, if that row is the first but not the only in the collection, the next rows will be ignored, as the collection will be considered "existed", and "existed" collections are only replaced if REFRESH hint is present. To prevent it, we defer initialization to the end of the hydration. Fixes doctrineGH-9807
popov-a-e
added a commit
to popov-a-e/orm
that referenced
this issue
Jul 1, 2022
If ObjectHydrator faces an empty row to an uninitialized collection, it initializes it, to prevent it from querying again (DDC-1526). However, if that row is the first but not the only in the collection, the next rows will be ignored, as the collection will be considered "existing", and "existing" collections are only replaced if REFRESH hint is present. To prevent it, we defer initialization to the end of the hydration. Fixes doctrineGH-9807
popov-a-e
added a commit
to popov-a-e/orm
that referenced
this issue
Jul 3, 2022
If ObjectHydrator faces an empty row to an uninitialized collection, it initializes it, to prevent it from querying again (DDC-1526). However, if that row is the first but not the only in the collection, the next rows will be ignored, as the collection will be considered "existing", and "existing" collections are only replaced if REFRESH hint is present. To prevent it, we defer initialization to the end of the hydration. Fixes doctrineGH-9807
greg0ire
added a commit
that referenced
this issue
Jul 3, 2022
[GH-9807] Fix: initialize potentially empty collections at the hydration complete
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Summary
When the first row of a leftJoin result contains null values (because of a SqlFilter), the collection is hydrated as empty.
Current behavior
The collection is hydrated as empty if the first row is nullish.
How to reproduce
Details for reproduction is in https://github.com/freiondrej-lmc/doctrine_orm_bug_reproduction .
Expected behavior
The Collection should be hydrated with existing data.
The text was updated successfully, but these errors were encountered: