summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-12-19 12:39:15 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2016-12-19 12:41:28 -0500
commit675f021368a375c330c07d0826e30049f2f0e016 (patch)
treecdd47650f330e1b69caf65f344265f02f2324e1a /lib/sqlalchemy
parenta1de76c42f6b64808448aed6e821fbb3b988f99b (diff)
downloadsqlalchemy-675f021368a375c330c07d0826e30049f2f0e016.tar.gz
Add real .entities to _BundleEntity
Fixed bug where the single-table inheritance query criteria would not be inserted into the query in the case that the :class:`.Bundle` construct were used as the selection criteria. Change-Id: Ib7c128ceef5c3220a098cdfd0270c43a2a67716d Fixes: #3874
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/query.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index 340e71d25..770345315 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -3802,11 +3802,16 @@ class _BundleEntity(_QueryEntity):
else:
_ColumnEntity(self, expr, namespace=self)
- self.entities = ()
-
self.supports_single_entity = self.bundle.single_entity
@property
+ def entities(self):
+ entities = []
+ for ent in self._entities:
+ entities.extend(ent.entities)
+ return entities
+
+ @property
def entity_zero(self):
for ent in self._entities:
ezero = ent.entity_zero