-
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
Explain EntityManager::getReference()
peculiarities
#10800
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As a side note, I noticed the That seems strange, I don't see what that topic has to do with it. WDYT about having a dedicated page for proxies or moving that topic elsewhere? |
As one takeaway from doctrine#3037 (comment) and doctrine#843, we should look into better explaining the `EntityManager::getReference()` method, it’s semantics, caveats and potential responsibilities placed on the user. This PR tries to do that, so it fixes doctrine#10797.
Makes sense to me 👍 |
greg0ire
reviewed
Jun 26, 2023
Co-authored-by: Grégoire Paris <postmaster@greg0ire.fr>
greg0ire
approved these changes
Jun 26, 2023
SenseException
approved these changes
Jun 26, 2023
nicolas-grekas
added a commit
to nicolas-grekas/doctrine-orm
that referenced
this pull request
Jul 7, 2023
* 2.15.x: (23 commits) Fix cloning entities when using lazy-ghost proxies Fixes recomputation of single entity change set when entity contains enum attributes. Due to the fact that originalEntityData contains enum objects and ReflectionEnumProperty::getValue() returns value of enum, comparison of values are always falsy, resulting to update columns value even though it has not changes. Fix code style issues Use absolute references Avoid colon followed by double colon Use correct syntax for references Fix invalid reference syntax Use rst syntax Use internal link Escape pipes Introduce new workflow to test docs Remove lone dash (doctrine#10812) Treat id field proprites same as regular field Move three "Ticket/"-style tests to the right namespace Follow recommendation about multiline type Fix unserialize() errors when running tests on PHP 8.3 (doctrine#10803) Explain `EntityManager::getReference()` peculiarities (doctrine#10800) Upgrade to Psalm 5.13 test: assert `postLoad` has data first distinct() updates QueryBuilder state correctly ...
nicolas-grekas
added a commit
to nicolas-grekas/doctrine-orm
that referenced
this pull request
Jul 7, 2023
* 2.15.x: (23 commits) Fix cloning entities when using lazy-ghost proxies Fixes recomputation of single entity change set when entity contains enum attributes. Due to the fact that originalEntityData contains enum objects and ReflectionEnumProperty::getValue() returns value of enum, comparison of values are always falsy, resulting to update columns value even though it has not changes. Fix code style issues Use absolute references Avoid colon followed by double colon Use correct syntax for references Fix invalid reference syntax Use rst syntax Use internal link Escape pipes Introduce new workflow to test docs Remove lone dash (doctrine#10812) Treat id field proprites same as regular field Move three "Ticket/"-style tests to the right namespace Follow recommendation about multiline type Fix unserialize() errors when running tests on PHP 8.3 (doctrine#10803) Explain `EntityManager::getReference()` peculiarities (doctrine#10800) Upgrade to Psalm 5.13 test: assert `postLoad` has data first distinct() updates QueryBuilder state correctly ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As one takeaway from #3037 (comment) and #843, we should look into better explaining the
EntityManager::getReference()
method, it’s semantics, caveats and potential responsibilities placed on the user.This PR tries to do that, so it fixes #10797.