]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Guard against mapped classes in map_imperatively.
authorFederico Caselli <cfederico87@gmail.com>
Wed, 31 May 2023 20:36:00 +0000 (22:36 +0200)
committerFederico Caselli <cfederico87@gmail.com>
Tue, 6 Jun 2023 19:10:57 +0000 (21:10 +0200)
commitf16402b9b878c0b2bd54b1c25621f150e12033c5
treee6a32cf500f53ce7c83b4274452fc4d3aadb0697
parent693b8744ee45ebb65bfcbb9156935ffb2a3ee9ad
Guard against mapped classes in map_imperatively.

Added a check to prevent invocation of
meth:`_orm.registry.map_imperatively` using a mapped class as
paramref:`_orm.registry.map_imperatively.local_table`.

Fixes: #9869
Change-Id: Id404f75bf0af69eea942ad71662593bdafbd92ce
doc/build/changelog/unreleased_20/9869.rst [new file with mode: 0644]
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/sql/coercions.py
test/orm/declarative/test_basic.py