]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Apply path generation for superclasses to Load._set_path_strategy()
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 30 Nov 2018 19:36:20 +0000 (14:36 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 30 Nov 2018 19:36:20 +0000 (14:36 -0500)
commitfb05e085fe48a1c48fcb4bcf89ba58c0d7584b8c
treeae7ce08b13c97c1b0d673862cc3ac0ed4425f4b8
parent0a0b36686d5da0e7d04974c8df0ece574b71f3cb
Apply path generation for superclasses to Load._set_path_strategy()

Extended the fix first made as part of :ticket:`3287`, where a loader option
made against a subclass using a wildcard would extend itself to include
application of the wildcard to attributes on the super classes as well, to a
"bound" loader option as well, e.g. in an expression like
``Load(SomeSubClass).load_only('foo')``.  Columns that are part of the
parent class of ``SomeSubClass`` will also be excluded in the same way as if
the unbound option ``load_only('foo')`` were used.

Fixes: #4373
Change-Id: I2eee0e587c34323a77df077b9cb699da370c403d
doc/build/changelog/unreleased_13/4373.rst [new file with mode: 0644]
lib/sqlalchemy/orm/strategy_options.py
test/orm/test_deferred.py