diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-06-02 19:48:30 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-06-02 19:48:30 -0400 |
| commit | 35a674aab4a832e76232e7be4b16b7a635a19824 (patch) | |
| tree | e3df6c0b5b49efbc19d1b992ef534a7e1fc76b3c /lib/sqlalchemy/sql/visitors.py | |
| parent | 02ae3cd54d0c47850ae1c894abae256a4717fe2d (diff) | |
| download | sqlalchemy-35a674aab4a832e76232e7be4b16b7a635a19824.tar.gz | |
- figured out what the from_self() thing was about, part of query.statement, but would
like to improve upon query.statement needing to do this
Diffstat (limited to 'lib/sqlalchemy/sql/visitors.py')
| -rw-r--r-- | lib/sqlalchemy/sql/visitors.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/visitors.py b/lib/sqlalchemy/sql/visitors.py index 31ac686e3..c5a45ffd4 100644 --- a/lib/sqlalchemy/sql/visitors.py +++ b/lib/sqlalchemy/sql/visitors.py @@ -286,10 +286,12 @@ def replacement_traverse(obj, opts, replace): cloned = util.column_dict() stop_on = util.column_set([id(x) for x in opts.get('stop_on', [])]) + unconditional = opts.get('unconditional', False) def clone(elem, **kw): if id(elem) in stop_on or \ - 'no_replacement_traverse' in elem._annotations: + (not unconditional + and 'no_replacement_traverse' in elem._annotations): return elem else: newelem = replace(elem) |
