]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- rewrite cloned_traverse() and replacement_traverse() to use a straight
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 24 Jul 2011 21:51:01 +0000 (17:51 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 24 Jul 2011 21:51:01 +0000 (17:51 -0400)
commit8a483dbf38168ff43ca0652229b1d46afb23235d
tree0707d1e1f3912bda8262e32bd1e4e008a7c67b88
parent9867086943d60e347695930dd7f442f9e95e4577
- rewrite cloned_traverse() and replacement_traverse() to use a straight
recursive descent with clone() + _copy_internals().  This is essentially
what it was doing anyway with lots of unnecessary steps.
Fix Alias() to honor the given clone() function which may have been the
reason the traversal hadn't been fixed sooner.   Alias._copy_internals()
will specifically skip an alias of a Table
as a more specific form of what it was doing before.  This may need to
be further improved such that ClauseAdapter or replacement_traverse()
send it some specific hints what not to dig into; **kw has been added
to all _copy_internals() to support this.   replacement/clone traversal
is at least clear now.
- apply new no_replacement_traverse annotation to join created by
_create_joins(), fixes [ticket:2195]
- can replace orm.query "_halt_adapt" with "no_replacement_traverse"
CHANGES
lib/sqlalchemy/orm/properties.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/sql/expression.py
lib/sqlalchemy/sql/util.py
lib/sqlalchemy/sql/visitors.py
test/orm/test_joins.py
test/sql/test_generative.py
test/sql/test_selectable.py