[PR #8050] [GH-7633] disallow cache partial objects #10784

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

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

State: closed
Merged: Yes


There was a check in DefaultQueryCache that prevented partial queries,
because they are not supported. However the checked hint
Query::HINT_FORCE_PARTIAL_LOAD is optional, so cant be used to prevent
caching partial DQL queries.

Introduce a new hint that the SqlWalker sets on detecing a PARTIAL
query and throw an exception in the DefaultQueryCache if thats found.

**Original Pull Request:** https://github.com/doctrine/orm/pull/8050 **State:** closed **Merged:** Yes --- There was a check in DefaultQueryCache that prevented partial queries, because they are not supported. However the checked hint Query::HINT_FORCE_PARTIAL_LOAD is optional, so cant be used to prevent caching partial DQL queries. Introduce a new hint that the SqlWalker sets on detecing a PARTIAL query and throw an exception in the DefaultQueryCache if thats found.
admin added the pull-request label 2026-01-22 16:08:40 +01:00
admin closed this issue 2026-01-22 16:08:41 +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#10784