-
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
Add failing test with ToOne SL2 association #1301
Conversation
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DDC-3564 We use Jira to track the state of pull requests and the versions they got |
Hi @goetas , I've merge your PR but the test is still failing, unfortunately :(. |
:( |
|
||
/** | ||
* @Entity | ||
* @Cache("READ_ONLY") |
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.
Can you try to set it as NONSTRICT_READ_WRITE
? See http://doctrine-orm.readthedocs.org/en/latest/reference/second-level-cache.html#caching-mode
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.
It should work with any cache mode. Not having the associations resolve definitely sounds like a bug, no matter the cache mode :)
@bakura10 See bakura10#1 This should pass tests |
Hi,
This failing test is based on @FabioBatSilva tests here (https://github.com/FabioBatSilva/doctrine2/blob/4f7e71963f5197235fce9f87a56b02bbbba46026/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheOneToOneTest.php).
I've changed the test so that on Token association, there is no @Cache annotation.
The default behaviour would be to Doctrine set a proxy on non-cached association. Instead, it basically creates a "partial" object where any associations without the @Cache is set to null. I'm pretty sure it works the same ManyToOne association too.