]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Ensure of_type subclass taken into account with wildcards
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 26 Jan 2019 19:53:45 +0000 (14:53 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 26 Jan 2019 20:06:36 +0000 (15:06 -0500)
commitaa2ab71b7d9c36caa4b993ec9880b0f0023c3b3a
treebd0304a464d02fb8a540b1ed0aa5cd3092e4ab0c
parentd196c49918ee1e7fbce12e228aa7db33d098908f
Ensure of_type subclass taken into account with wildcards

Fixed a regression in 1.2 where a wildcard/load_only loader option would
not work correctly against a loader path where of_type() were used to limit
to a particular subclass.  The fix only works for of_type() of a simple
subclass so far, not a with_polymorphic entity which will be addressed in a
separate issue; it is unlikely this latter case was working previously.

Since we ensure that the entity is broken out into its superclasses
when a wilcard is encountered, we can limit the entity path to the
specific entity given in this case.

Within this issue some additional issues with with_polymorphic()
loaders were found which will be addressed in #4469.

Fixes: #4468
Change-Id: Ie91ec27b49104e019636f870776e294321586a9e
(cherry picked from commit 29e033f496c28e4d7b9a5bfc46096711f0aa5571)
doc/build/changelog/unreleased_12/4468.rst [new file with mode: 0644]
lib/sqlalchemy/orm/strategy_options.py
test/orm/test_deferred.py