]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Refactor "get" to allow for pluggable identity token schemes
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 20 Apr 2018 15:44:09 +0000 (11:44 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 20 Apr 2018 19:10:04 +0000 (15:10 -0400)
commiteee88f5fb5fb5cda1f92a6c7a8d27a57cfd86e71
tree1b899d63ccfd6151230157a72304447c32fab1ab
parentd3f9819df51c6fd32df991a769d6519f621f137d
Refactor "get" to allow for pluggable identity token schemes

Fixed regression in 1.2 within sharded query feature where the
new "identity_token" element was not being correctly considered within
the scope of a lazy load operation, when searching the identity map
for a related many-to-one element.   The new behavior will allow for
making use of the "id_chooser" in order to determine the best identity
key to retrieve from the identity map.  In order to achieve this, some
refactoring of 1.2's "identity_token" approach has made some slight changes
to the implementation of ``ShardedQuery`` which should be noted for other
derivations of this class.

Change-Id: I04fa60535deec2d0cdec89f602935dfebeb9eb9d
Fixes: #4228
(cherry picked from commit 43f278356d94b5342a1020a9a97feea0bb7cd88f)
doc/build/changelog/unreleased_12/4228.rst [new file with mode: 0644]
lib/sqlalchemy/ext/baked.py
lib/sqlalchemy/ext/horizontal_shard.py
lib/sqlalchemy/orm/loading.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/orm/strategies.py
test/ext/test_horizontal_shard.py
test/profiles.txt