-
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
#5854 workaround to avoid populating Second Level Cache from DQL queries with multiple nested DQL aliases #5856
#5854 workaround to avoid populating Second Level Cache from DQL queries with multiple nested DQL aliases #5856
Conversation
@@ -5,6 +5,7 @@ php: | |||
- 5.5 | |||
- 5.6 | |||
- 7.0 | |||
- 7.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, not yet available. I guess nightly
would be an alternative
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed
I think that we also have a small thing on https://github.com/doctrine/doctrine2/blob/3bc61d5f5e4aa75479dfe141e52326243972f530/tests/Doctrine/Tests/ORM/Cache/DefaultQueryCacheTest.php#L134. Shouldn't it be |
Yep, that needs fixing too. |
I believe we can fix those small problems in order to prevent that |
…ies with multiple nested DQL aliases
…iated against the wrong class name in a test
c386bb9
to
5533cec
Compare
5533cec
to
163dac4
Compare
@Ocramius I made a couple changes here, hopefully will fix the issue. |
Ok, seems like I'll have to do some This patch is good to go meanwhile, thanks @FabioBatSilva! |
Provides workaround for #5854
Doesn't really fix the issue though.
The problem is following:
Caching a query like this one via SLC will have the
DefaultQueryCache
loop over associations ofA
, but using metadata of all DQL aliases/associations.This workaround prevents that, but also disables caching of fetched
c
instances from this example.Note: no tests provided, as existing tests already show the regression.