]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
add hooks/docs for automap w/ multiple schemas
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 24 Jan 2023 21:31:01 +0000 (16:31 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 26 Jan 2023 22:07:42 +0000 (17:07 -0500)
commite84ea5bb5687ec6f6f3607565c1714b82d6647aa
tree3b5785a8015359679e87ff78195d676b084690ef
parent19cbf8038f4a9e8e0820bcfeb6b65bf5bc873d39
add hooks/docs for automap w/ multiple schemas

Added new feature to :class:`.Automap` for autoload of classes across
multiple schemas which may have overlapping names, by providing both a
:paramref:`.Automap.prepare.modulename_for_class` parameter as well as a
new collection :attr:`.AutomapBase.by_module`, which stores a dot-separated
namespace of module names linked to classes.

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