]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
do not allow non-cache-key entity objects in annotations
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 30 Apr 2023 17:56:33 +0000 (13:56 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 30 Apr 2023 18:53:31 +0000 (14:53 -0400)
commit13752f00f30f369de8a51859e78d79b06601762c
tree363bcc3f223c5020c35c212143cade91cb3c5b85
parent6abb35d329aab9b8f27326d223cb9ac935c133e1
do not allow non-cache-key entity objects in annotations

Fixed critical caching issue where combination of :func:`_orm.aliased()`
:func:`_sql.case` and :func:`_hybrid.hybrid_property` expressions would
cause a cache key mismatch, leading to cache keys that held onto the actual
:func:`_orm.aliased` object while also not matching each other, filling up
the cache.

Fixes: #9728
Change-Id: I700645b5629a81a0104cf923db72a7421fa43ff4
(cherry picked from commit 4d69d83530666f9aaf3fb327d8c63110ef5e7ff5)
doc/build/changelog/unreleased_14/9728.rst [new file with mode: 0644]
lib/sqlalchemy/orm/attributes.py
test/orm/test_cache_key.py