diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-02-11 20:33:56 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-02-11 20:33:56 -0500 |
commit | d934ea23e24880a5c784c9e5edf9ead5bc965a83 (patch) | |
tree | 788952f0c7e2ce44b2403ad3ab545257b6e94b77 /lib/sqlalchemy/sql/expression.py | |
parent | 0634ea79b1a23a8b88c886a8a3f434ed300691e2 (diff) | |
download | sqlalchemy-d934ea23e24880a5c784c9e5edf9ead5bc965a83.tar.gz |
- figured out again why deannotate must clone()
- got everything working. just need to update
error strings
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
-rw-r--r-- | lib/sqlalchemy/sql/expression.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index ebf4de9a2..573ace47f 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -1589,7 +1589,7 @@ class ClauseElement(Visitable): """ return sqlutil.Annotated(self, values) - def _deannotate(self, values=None): + def _deannotate(self, values=None, clone=False): """return a copy of this :class:`.ClauseElement` with annotations removed. @@ -1597,9 +1597,14 @@ class ClauseElement(Visitable): to remove. """ - # since we have no annotations we return - # self - return self + if clone: + # clone is used when we are also copying + # the expression for a deep deannotation + return self._clone() + else: + # if no clone, since we have no annotations we return + # self + return self def unique_params(self, *optionaldict, **kwargs): """Return a copy with :func:`bindparam()` elments replaced. |