Don't use fetchJoinCollection on Doctrine Paginator when not needed#2639
Merged
teohhanhui merged 1 commit intoMar 29, 2019
Merged
Conversation
teohhanhui
requested review from
Simperfit,
alanpoulain,
antograssiot,
dunglas,
meyerbaptiste,
soyuka and
vincentchalamon
March 22, 2019 15:07
teohhanhui
force-pushed
the
fix/doctrine-paginator-fetch-join-collection
branch
7 times, most recently
from
March 22, 2019 22:41
b5c8553 to
b0d02c7
Compare
soyuka
approved these changes
Mar 25, 2019
teohhanhui
force-pushed
the
fix/doctrine-paginator-fetch-join-collection
branch
2 times, most recently
from
March 25, 2019 15:02
0bd5756 to
e54656c
Compare
Contributor
Author
|
Since we have no way to cover all use cases, and "we don't know when we don't know" (so we can't even fall back to safe defaults, unless we remove the whole guessing altogether), it's important that we let the user configure these in the resource / operation attributes (done in this PR). I'd argue that our guessing is worth it, because it'd give the best performance for most users out of the box. I think it's consistent with what I perceive as the philosophy of API Platform, which is to make things effortless for the most common use cases. When the user starts doing more advanced stuff, they are then required to take over control. |
teohhanhui
force-pushed
the
fix/doctrine-paginator-fetch-join-collection
branch
from
March 26, 2019 14:51
e54656c to
aa6e2c7
Compare
Refactor QueryChecker etc.
teohhanhui
force-pushed
the
fix/doctrine-paginator-fetch-join-collection
branch
from
March 27, 2019 13:19
aa6e2c7 to
20291cc
Compare
dunglas
approved these changes
Mar 29, 2019
This file contains hidden or 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
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.
Refactor
QueryCheckeretc.I've removed the flawed handling of "join by class", as we simply have not enough information to do the right thing there. The main caveat (as was before) is that our checking covers the "80%":
SELECT/ORDER BYclausesbut will be confused in the remaining "20%".
For example:
🗹 Supported:
🗷 Not supported:
🗷 Not supported: