diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2021-06-01 21:40:27 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2021-06-01 21:40:27 +0000 |
| commit | 84d36fd975fd58f5670571ae2dc83a2b53534cdd (patch) | |
| tree | 21dbb39fcea296078de4f69981779240e429fabe /lib/sqlalchemy | |
| parent | 32c09ed1c9e3b3efad9be63b32c1b36273de992c (diff) | |
| parent | 0c46a5753329a4f82784ccc457ba1a0e750815b9 (diff) | |
| download | sqlalchemy-84d36fd975fd58f5670571ae2dc83a2b53534cdd.tar.gz | |
Merge "improve "overlaps" warning; test for m2m"
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/orm/relationships.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py index efdd7edf1..171df3e21 100644 --- a/lib/sqlalchemy/orm/relationships.py +++ b/lib/sqlalchemy/orm/relationships.py @@ -3451,8 +3451,9 @@ class JoinCondition(object): "constraints are partially overlapping, the " "orm.foreign() " "annotation can be used to isolate the columns that " - "should be written towards. The 'overlaps' " - "parameter may be used to remove this warning." + "should be written towards. To silence this " + "warning, add the parameter 'overlaps=\"%s\"' to the " + "'%s' relationship." % ( self.prop, from_, @@ -3461,6 +3462,8 @@ class JoinCondition(object): "'%s' (copies %s to %s)" % (pr, fr_, to_) for (pr, fr_) in other_props ), + ",".join(pr.key for pr, fr in other_props), + self.prop, ), code="qzyx", ) |
