summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-08-24 11:30:57 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-08-24 11:30:57 -0400
commitf8061236b8e74596fcb372149b76b9caa476e5b5 (patch)
tree42bba21bb0cec4e43a9980d0df60fd5e145fd3b1
parent85ed24f79e37d3b38fc24b2c6b889d226fc41ca5 (diff)
downloadsqlalchemy-f8061236b8e74596fcb372149b76b9caa476e5b5.tar.gz
- this comment is wrong, the method here returns all mapper entities
- use a simple isinstance() check instead of looking for presence of "primary_entity" flag, that's a little unclear
-rw-r--r--lib/sqlalchemy/orm/query.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index f5925d96c..8f835cd30 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -299,11 +299,8 @@ class Query(object):
@property
def _mapper_entities(self):
- # TODO: this is wrong, its hardcoded to "primary entity" when
- # for the case of __all_equivs() it should not be
- # the name of this accessor is wrong too
for ent in self._entities:
- if hasattr(ent, 'primary_entity'):
+ if isinstance(ent, _MapperEntity):
yield ent
def _joinpoint_zero(self):