]> 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:04:07 +0000 (15:04 -0500)
commit29e033f496c28e4d7b9a5bfc46096711f0aa5571
treebc9f3e1fa7ff0b9df9082406a4a4dc9e3b5d5dbc
parentecbaa44582ab85def3fb500361b219581fab5d95
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
doc/build/changelog/unreleased_12/4468.rst [new file with mode: 0644]
lib/sqlalchemy/orm/strategy_options.py
test/orm/test_deferred.py