[PR #1301] Add failing test with ToOne SL2 association #9357

Closed
opened 2026-01-22 16:04:05 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/1301

State: closed
Merged: No


Hi,

This failing test is based on @FabioBatSilva tests here (4f7e71963f/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.

**Original Pull Request:** https://github.com/doctrine/orm/pull/1301 **State:** closed **Merged:** No --- 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.
admin added the pull-request label 2026-01-22 16:04:05 +01:00
admin closed this issue 2026-01-22 16:04:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9357