summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-08-03 00:33:00 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-08-03 00:33:00 +0000
commit2ca2c769cdf77ff8f1fdcf9ad7e606676fcffee3 (patch)
tree6d8be545bbcc56bd2fc67b8f2ec8bfdd92041de9
parentaaefbb7e04c0b673d052c225e51749549f354f12 (diff)
downloadsqlalchemy-2ca2c769cdf77ff8f1fdcf9ad7e606676fcffee3.tar.gz
oops: committed the rest of [changeset:1759], removed print in sqlite + restored error check in Join
-rw-r--r--lib/sqlalchemy/databases/sqlite.py2
-rw-r--r--lib/sqlalchemy/sql.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py
index 529486f46..192b90561 100644
--- a/lib/sqlalchemy/databases/sqlite.py
+++ b/lib/sqlalchemy/databases/sqlite.py
@@ -212,7 +212,7 @@ class SQLiteDialect(ansisql.ANSIDialect):
fk = ([],[])
fks[constraint_name] = fk
- print "row! " + repr([key for key in row.keys()]), repr(row)
+ #print "row! " + repr([key for key in row.keys()]), repr(row)
# look up the table based on the given table's engine, not 'self',
# since it could be a ProxyEngine
remotetable = schema.Table(tablename, table.metadata, autoload=True, autoload_with=connection)
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: