From fbcb056d90f4a54eed7cf270818c9a1fc173f99f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 29 Aug 2014 12:05:00 -0400 Subject: - 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 --- lib/sqlalchemy/orm/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/orm/query.py') 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 -- cgit v1.2.1