diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-08-29 12:05:00 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-08-29 12:05:00 -0400 |
commit | fbcb056d90f4a54eed7cf270818c9a1fc173f99f (patch) | |
tree | e095fb7b11a76ea152595b561f79222896b76b1d /lib/sqlalchemy/orm/query.py | |
parent | 08d2c863df04f954f305b460bba45b15a410fc74 (diff) | |
download | sqlalchemy-fbcb056d90f4a54eed7cf270818c9a1fc173f99f.tar.gz |
- Changed the approach by which the "single inheritance criterion"
is applied, when using :meth:`.Query.from_self`, or its common
user :meth:`.Query.count`. The criteria to limit rows to those
with a certain type is now indicated on the inside subquery,
not the outside one, so that even if the "type" column is not
available in the columns clause, we can filter on it on the "inner"
query.
fixes #3177
Diffstat (limited to 'lib/sqlalchemy/orm/query.py')
-rw-r--r-- | lib/sqlalchemy/orm/query.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index b05646719..61fbd1be8 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -945,9 +945,9 @@ class Query(object): """ fromclause = self.with_labels().enable_eagerloads(False).\ - _set_enable_single_crit(False).\ statement.correlate(None) q = self._from_selectable(fromclause) + q._enable_single_crit = False if entities: q._set_entities(entities) return q |