From 2ca2c769cdf77ff8f1fdcf9ad7e606676fcffee3 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 3 Aug 2006 00:33:00 +0000 Subject: oops: committed the rest of [changeset:1759], removed print in sqlite + restored error check in Join --- lib/sqlalchemy/sql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/sql.py') diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index 8ad3ced45..5d3c7692a 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -1084,8 +1084,8 @@ class Join(FromClause): self.foreignkey = fk.parent if len(crit) == 0: raise exceptions.ArgumentError("Cant find any foreign key relationships between '%s' and '%s'" % (primary.name, secondary.name)) -# elif len(constraints) > 1: -# raise exceptions.ArgumentError("Cant determine join between '%s' and '%s'; tables have more than one foreign key constraint relationship between them. Please specify the 'onclause' of this join explicitly. %s" % (primary.name, secondary.name, constraints)) + elif len(constraints) > 1: + raise exceptions.ArgumentError("Cant determine join between '%s' and '%s'; tables have more than one foreign key constraint relationship between them. Please specify the 'onclause' of this join explicitly." % (primary.name, secondary.name)) elif len(crit) == 1: return (crit[0]) else: -- cgit v1.2.1