summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/compiler.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-03-12 13:35:27 -0700
committerMike Bayer <mike_mp@zzzcomputing.com>2012-03-12 13:35:27 -0700
commit57868f587ee9f1e35661e8dfadc0b73740300da6 (patch)
treed3150918249ea97076bb462ca005ea65b4e6ed89 /lib/sqlalchemy/sql/compiler.py
parent6c03a8ddd366b62285e2671a25a429f7bff1d052 (diff)
downloadsqlalchemy-57868f587ee9f1e35661e8dfadc0b73740300da6.tar.gz
- [bug] Fixed bug whereby a primaryjoin
condition with a "literal" in it would raise an error on compile with certain kinds of deeply nested expressions which also needed to render the same bound parameter name more than once. [ticket:2425]
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r--lib/sqlalchemy/sql/compiler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index e8f86634d..6f010ed54 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -655,7 +655,8 @@ class SQLCompiler(engine.Compiled):
if name in self.binds:
existing = self.binds[name]
if existing is not bindparam:
- if existing.unique or bindparam.unique:
+ if (existing.unique or bindparam.unique) and \
+ not existing.proxy_set.intersection(bindparam.proxy_set):
raise exc.CompileError(
"Bind parameter '%s' conflicts with "
"unique bind parameter of the same name" %