]> 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 18:36:00 +0000 (14:36 -0400)
commit43f278356d94b5342a1020a9a97feea0bb7cd88f
treece38c527faf41b0e31b3a5e616cb75e9574e5ef5
parent65ba2606be7f0eef2736270a099940ab2c218c4d
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
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