Skip to content
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

Put into cache using root entity name #8023

Merged
merged 1 commit into from Feb 16, 2020

Conversation

peterkeatingie
Copy link
Contributor

@peterkeatingie peterkeatingie commented Feb 15, 2020

The cache key for reading is created based on the entity root name but the cache was written with a key based on the found entity (the child in this case) resulting in cache miss.
Using the same root name when putting fixes the issue. I do believe that any extending instances should have unique identifiers as they will have to share an identifier from the base class. This will mean the key won't be ambiguous - if my thinking is correct.

#7969

Copy link
Member

@beberlei beberlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked the Cache code myself, everywhere cache keys are created the root entity name is used, except here. So that is definately a bug and the right fix.

@beberlei beberlei merged commit ca57222 into doctrine:2.7 Feb 16, 2020
@greg0ire greg0ire added the Bug label Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants