]> 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:33 +0000 (16:17 -0400)
commit29838ef584d49e5ecca08f76e4966454dc7f060f
tree90e30e21a350c9bb53f1312793ec2e370cf1228b
parent75ab50869b37368f32ec311dfb59777c0c1d1edb
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
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