diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-01-18 11:02:57 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-01-18 11:02:57 -0500 |
commit | e6ded82eef63235d7cbfe3ab3382a48f32913640 (patch) | |
tree | ff255d62611b9f8af600d2d67033a2b374343b53 /lib/sqlalchemy/sql/lambdas.py | |
parent | eb716884a4abcabae84a6aaba105568e925b7d27 (diff) | |
download | sqlalchemy-e6ded82eef63235d7cbfe3ab3382a48f32913640.tar.gz |
detect map_imperatively() called twice
Fixed issue where calling upon :meth:`_orm.regsitry.map_imperatively` more
than once for the same class would produce an unexpected error, rather than
an informative error that the target class is already mapped. This behavior
differed from that of the :func:`_orm.mapper` function which does report an
informative message already.
For 2.0, this change also cleans up the logic that detects against
`Mapper()` or `_mapper()` being invoked directly. 1.4's backport will
take on a different format as `mapper()` is still public API in that
release.
Fixes: #7579
Change-Id: Ie74a1a2e97f8b6a81ac1942040edd8cae82f4bd8
Diffstat (limited to 'lib/sqlalchemy/sql/lambdas.py')
0 files changed, 0 insertions, 0 deletions