]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
apply of_type error message to load.options() as well
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 30 Jan 2023 00:51:39 +0000 (19:51 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 30 Jan 2023 23:02:46 +0000 (18:02 -0500)
commit26c014e72d9ded83fc90d1577fb7b5c3ef3977f8
tree6175095768b5b8c2967357824397147b3b0f8152
parent74d97a6ffcfc51a7c3d9186912439631887a09f0
apply of_type error message to load.options() as well

Improved the error reporting when linking strategy options from a base
class to another attribute that's off a subclass, where ``of_type()``
should be used. Previously, when :meth:`.Load.options` is used, the message
would lack informative detail that ``of_type()`` should be used, which was
not the case when linking the options directly. The informative detail now
emits even if :meth:`.Load.options` is used.

Fixes: #9182
Change-Id: Ibc14923d0cbca9114316cb7db2b30f091dc28af8
doc/build/changelog/unreleased_20/9182.rst [new file with mode: 0644]
lib/sqlalchemy/orm/strategy_options.py
test/orm/inheritance/test_relationship.py
test/orm/test_ac_relationships.py
test/orm/test_deferred.py
test/orm/test_options.py