]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fixed a small bug in the dogpile example where the generation
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 28 May 2013 05:22:10 +0000 (01:22 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 28 May 2013 05:22:10 +0000 (01:22 -0400)
of SQL cache keys wasn't applying deduping labels to the
statement the same way :class:`.Query` normally does.

doc/build/changelog/changelog_08.rst
examples/dogpile_caching/caching_query.py

index fbc79b108e9b3dec4968088ab5986504a4b58372..bec8a3f05924acd7dd9617a98c68c789cf5ea8b5 100644 (file)
@@ -6,6 +6,13 @@
 .. changelog::
     :version: 0.8.2
 
+    .. change::
+      :tags: bug, examples
+
+      Fixed a small bug in the dogpile example where the generation
+      of SQL cache keys wasn't applying deduping labels to the
+      statement the same way :class:`.Query` normally does.
+
     .. change::
       :tags: bug, engine, sybase
       :tickets: 2732
index f4724fb0b6d139fca43a18a134ce7a7c5f122207..fb019cc6b09c7d9726624bf8afbf448e7c0fcb48 100644 (file)
@@ -136,7 +136,7 @@ def _key_from_query(query, qualifier=None):
 
     """
 
-    stmt = query.statement
+    stmt = query.with_labels().statement
     compiled = stmt.compile()
     params = compiled.params