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 :(. |
|
:( |
There was a problem hiding this comment.
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.
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.