diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-11-03 02:52:30 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-11-03 02:52:30 +0000 |
| commit | a5dfbeedb9f7ae148081d1dbc3e91e876526eb90 (patch) | |
| tree | 070cede0b9a927c5672a7b847113a9947a2726ce /lib/sqlalchemy/sql/expression.py | |
| parent | 334d5118bb7bcf6fcf052c1b12182009fe54ebef (diff) | |
| download | sqlalchemy-a5dfbeedb9f7ae148081d1dbc3e91e876526eb90.tar.gz | |
- Improved the behavior of aliased() objects such that they more
accurately adapt the expressions generated, which helps
particularly with self-referential comparisons. [ticket:1171]
- Fixed bug involving primaryjoin/secondaryjoin conditions
constructed from class-bound attributes (as often occurs
when using declarative), which later would be inappropriately
aliased by Query, particularly with the various EXISTS
based comparators.
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
| -rw-r--r-- | lib/sqlalchemy/sql/expression.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index a9ef45dc1..3b996d6cb 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -987,6 +987,13 @@ class ClauseElement(Visitable): @property def _cloned_set(self): + """Return the set consisting all cloned anscestors of this ClauseElement. + + Includes this ClauseElement. This accessor tends to be used for + FromClause objects to identify 'equivalent' FROM clauses, regardless + of transformative operations. + + """ f = self while f is not None: yield f @@ -1008,7 +1015,11 @@ class ClauseElement(Visitable): if Annotated is None: from sqlalchemy.sql.util import Annotated return Annotated(self, values) - + + def _deannotate(self): + """return a copy of this ClauseElement with an empty annotations dictionary.""" + return self._clone() + def unique_params(self, *optionaldict, **kwargs): """Return a copy with ``bindparam()`` elments replaced. |
