]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Check for non-mapped property in synonym
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 4 Sep 2017 20:21:14 +0000 (16:21 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 4 Sep 2017 22:56:38 +0000 (18:56 -0400)
commit8ec1369eb3dca6cff1d329a11066559e8aba38c5
tree2c8b80a16bdca940fd37687acd707e50ba3b1f4a
parent4be865f79beae79a027561c979286f1dc5bc3fc9
Check for non-mapped property in synonym

An :class:`.InvalidRequestError` is raised when a :func:`.synonym`
is used against an attribute that is not against a :class:`.MapperProperty`,
such as an association proxy.  Previously, a recursion overflow would
occur trying to locate non-existent attributes.

Change-Id: If2ce38c429a69951df4c94b71b74edbd59d775e3
Fixes: #4067
(cherry picked from commit 130f31ca79c7b40b2cb8aa1a4af7049408074d12)
doc/build/changelog/unreleased_11/4067.rst [new file with mode: 0644]
lib/sqlalchemy/orm/descriptor_props.py
test/orm/test_mapper.py