mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3749: [GH-1414] Added: A public SQLFilter Hash Function #4598
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (May 29, 2015).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of nea:
Url: https://github.com/doctrine/doctrine2/pull/1414
Message:
Hi
To be more flexible from a custom SQLFilter perspective, a dedicated hash function was added, which is not final and can be used by any implementing class to manipulate their e.g. caching behaviour.
The idea came from the event of having a query cache running and a filter, requiring to add actual current timestamps to the queries for comparison purposes (i.e. SoftDeleteable). As the old timestamps are cached too and the parser not fired again, old entities were returned.
As the cache id is based also on the filters hash, a quick and I think good, slick solution would be to add a Hash Function that can be manipulated by an owning filter, to handle its behaviour on its own.
It defaults back to **toString and therefore nothing changes in basics but it could be.
Cheers
Changes: