]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
warn for local-only column in remote side
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 25 Sep 2022 18:56:22 +0000 (14:56 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 25 Sep 2022 20:17:40 +0000 (16:17 -0400)
commite05a8464c120fc7d2e3776b5a70fefbbe48be81c
treeb486db03d77d40785050397f5c841be5c37d66e8
parentb9e2926d661b80ee7b7c094c92cfa272d81b0b8b
warn for local-only column in remote side

A warning is emitted in ORM configurations when an explicit
:func:`_orm.remote` annotation is applied to columns that are local to the
immediate mapped class, when the referenced class does not include any of
the same table columns. Ideally this would raise an error at some point as
it's not correct from a mapping point of view.

Fixes: #7094
Fixes: #8575
Change-Id: Ia31be24aebe143161e19dc311b52c08fd5014d33
(cherry picked from commit 29838ef584d49e5ecca08f76e4966454dc7f060f)
doc/build/changelog/unreleased_14/7094.rst [new file with mode: 0644]
lib/sqlalchemy/orm/relationships.py
test/orm/test_cycles.py
test/orm/test_relationships.py