]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
More descriptive error for non-mapped string prop name
authorjonathan vanasco <jonathan@2xlp.com>
Mon, 20 Apr 2020 17:56:49 +0000 (13:56 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 25 Aug 2020 15:03:33 +0000 (11:03 -0400)
commit5e691f91d2fa704ffe2de58f2b7581eb5ae837d3
treec4ef1cb55cadfd8afc1527f00fc9ca129ab4df1f
parent0a234fee4bed27036f7d75b659b6a2ed0512efe6
More descriptive error for non-mapped string prop name

Fixed issue where using a loader option against a string attribute name
that is not actually a mapped attribute, such as a plain Python descriptor,
would raise an uninformative AttributeError;  a descriptive error is now
raised.

Fixes: #4589
Closes: #4594
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4594
Pull-request-sha: 2b7ed5240f49be90f9390e3d041c9cb957083465

Change-Id: I66b9937991eb7cdbe074a92f490af1c80d16449e
(cherry picked from commit 7700005a1f3504e26633a55db5cddeac114cb78f)
doc/build/changelog/unreleased_13/4589.rst [new file with mode: 0644]
lib/sqlalchemy/orm/strategy_options.py
test/orm/test_options.py