summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-04-03 11:24:16 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-04-03 11:24:16 -0400
commit35adeb95bf917330e1366f8a7252999419819fb1 (patch)
treec1c197ad53ec2c0fc6ea3a2c57e6bc4bcab9f04c /lib/sqlalchemy
parentabcef1253434ca5359a93fe49f48fe8b90dd401e (diff)
downloadsqlalchemy-35adeb95bf917330e1366f8a7252999419819fb1.tar.gz
then spiff up that error msg
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/relationships.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py
index c1503a79a..1a6b8a608 100644
--- a/lib/sqlalchemy/orm/relationships.py
+++ b/lib/sqlalchemy/orm/relationships.py
@@ -530,8 +530,13 @@ class JoinCondition(object):
def _check_remote_side(self):
if not self.local_remote_pairs:
raise sa_exc.ArgumentError('Relationship %s could '
- 'not determine any local/remote column '
- 'pairs.'
+ 'not determine any unambiguous local/remote column '
+ 'pairs based on join condition and remote_side '
+ 'arguments. '
+ 'Consider using the remote() annotation to '
+ 'accurately mark those elements of the join '
+ 'condition that are on the remote side of '
+ 'the relationship.'
% (self.prop, ))
def _check_foreign_cols(self, join_condition, primary):