summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/expression.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-07-06 12:35:45 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-07-06 12:35:45 -0400
commit5b8738b7e390471bd31b9ece90d0a3fd7653d859 (patch)
tree81b520b5ef6dd004f61112441d8b0c5bd76270a5 /lib/sqlalchemy/sql/expression.py
parent138774b234457bde1af522062be74403d71ea7d9 (diff)
downloadsqlalchemy-5b8738b7e390471bd31b9ece90d0a3fd7653d859.tar.gz
- The join condition produced by with_parent
as well as when using a "dynamic" relationship against a parent will generate unique bindparams, rather than incorrectly repeating the same bindparam. [ticket:2207]. Also in 0.6.9.
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
-rw-r--r--lib/sqlalchemy/sql/expression.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py
index 66a87c26f..071bb3c50 100644
--- a/lib/sqlalchemy/sql/expression.py
+++ b/lib/sqlalchemy/sql/expression.py
@@ -2498,7 +2498,16 @@ class _BindParamClause(ColumnElement):
else:
self.key = key or _generated_label('%%(%d param)s'
% id(self))
+
+ # identifiying key that won't change across
+ # clones, used to identify the bind's logical
+ # identity
+ self._identifying_key = self.key
+
+ # key that was passed in the first place, used to
+ # generate new keys
self._orig_key = key or 'param'
+
self.unique = unique
self.value = value
self.callable = callable_