]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
locate automap base in hierarchy directly
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 24 Feb 2023 15:58:25 +0000 (10:58 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 24 Feb 2023 15:58:25 +0000 (10:58 -0500)
commit60ddd3725600aa121e2e7b4be49dc9bd244ce0c5
treecf3e9dc2e99d1259af3293d32b27eebc90b4222a
parent8b108297d075ae68178cd18a9cb4d06feee7e075
locate automap base in hierarchy directly

Fixed issue in automap where calling ``.prepare()`` from one of the mapped
classes would not use the correct base class when automap detected new
tables, instead using the given class, leading to mappers trying to
configure inheritance. While one should normally call ``.prepare()`` from
the base in any case, it shouldn't misbehave that badly when called from a
subclass.

Fixes: #9367
Change-Id: I705d4d939d45af52bc58a74e65994205ab791634
doc/build/changelog/unreleased_20/9367.rst [new file with mode: 0644]
lib/sqlalchemy/ext/automap.py
test/ext/test_automap.py