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
Entity cache key is built differently on read than on write #1559
Entity cache key is built differently on read than on write #1559
Conversation
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DDC-4003 We use Jira to track the state of pull requests and the versions they got |
The DefaultQueryCacheTest has a region stub that doesn't check on key hashes and returns entries without being able to assert on arguments. Switching those tests to Phpunit mocks could have hinted on this error. |
Also, DefaultQueryCache is way too coupled to everything going on around L2. It has access to the EntityManager, to UnitOfWork, to Persisters... it practically knows the whole ORM. |
@guiwoda how did you get to this bug? I can't consider the patch without a test scenario that validates it :-\ |
You need a cacheable (nonstrict_rw, but could be any) pair of entities in a INHERITANCE_SINGLE form. Use a Repository to You'll notice that cache updates are always done through the |
@guiwoda I am asking for a test case (phpunit test), not a description only, heh :-) |
I know 😄 |
@Ocramius there's the test! Let me know if you need anything else! |
…ance Entity cache key is built differently on read than on write
👍 |
Guys, any plans on releasing with this PR and #1552? Thanks! |
We're working on 2.6, but it's done when it's done. |
@Ocramius I'm not asking for you guys to do extra work! I really appreciate everything you do for us mortal folks. |
@guiwoda if it is in |
@Ocramius yup, they're both merged to master. Yay! 🎉 |
Related to #1552, cache keys are scattered throughout L2 implementation and are built inconsistently.