summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/visitors.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-02-06 12:20:15 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2012-02-06 12:20:15 -0500
commit73f734bf80166c7dfce4892941752d7569a17524 (patch)
tree337f48354f72d2c1ef75f0d9724a395b71e7b50c /lib/sqlalchemy/sql/visitors.py
parent2dbeeff50b7ccc6f47b2816a59f99f051fdabc8c (diff)
downloadsqlalchemy-73f734bf80166c7dfce4892941752d7569a17524.tar.gz
initial annotations approach to join conditions. all tests pass, plus additional tests in #1401 pass.
would now like to reorganize RelationshipProperty more around the annotations concept.
Diffstat (limited to 'lib/sqlalchemy/sql/visitors.py')
-rw-r--r--lib/sqlalchemy/sql/visitors.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/sql/visitors.py b/lib/sqlalchemy/sql/visitors.py
index cdcf40aa8..75e099f0d 100644
--- a/lib/sqlalchemy/sql/visitors.py
+++ b/lib/sqlalchemy/sql/visitors.py
@@ -240,16 +240,16 @@ def replacement_traverse(obj, opts, replace):
replacement by a given replacement function."""
cloned = util.column_dict()
- stop_on = util.column_set(opts.get('stop_on', []))
+ stop_on = util.column_set([id(x) for x in opts.get('stop_on', [])])
def clone(elem, **kw):
- if elem in stop_on or \
+ if id(elem) in stop_on or \
'no_replacement_traverse' in elem._annotations:
return elem
else:
newelem = replace(elem)
if newelem is not None:
- stop_on.add(newelem)
+ stop_on.add(id(newelem))
return newelem
else:
if elem not in cloned: