mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
e1bbe78b72
* SQLAlchemy 1.0 introduced "baked queries" - a way to construct Query objects so that they can be cached and reused. * SQLAlchemy 1.2 changed lazyloaded columns to use baked queries under the hood. * Our MultilangQuery class attempts to set _default_language_id right before the query is executed by overriding the __iter__ method. * Baked queries bypass the __iter__ method and call a lower-level method, _execute_and_instances, directly. * This caused problems where _default_language_id wouldn't get set correctly on lazyloaded columns. * To fix, make MultilangQuery override the _execute_and_instances method instead of __iter__. * This is really just a stopgap: the root cause is that query params are not preserved across lazyloads. Tested with SQLAlchemy 0.9.7, 1.1.18, and 1.2.5. Updates #236. |
||
---|---|---|
.. | ||
cli | ||
data/csv | ||
db | ||
doc | ||
struct | ||
tests | ||
util | ||
__init__.py | ||
__main__.py | ||
compatibility.py | ||
defaults.py | ||
formulae.py | ||
lookup.py | ||
main.py | ||
roomaji.py | ||
search.py |