summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/loading.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/orm/loading.py')
-rw-r--r--lib/sqlalchemy/orm/loading.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/sqlalchemy/orm/loading.py b/lib/sqlalchemy/orm/loading.py
index 8de7d5a8b..25ba8a398 100644
--- a/lib/sqlalchemy/orm/loading.py
+++ b/lib/sqlalchemy/orm/loading.py
@@ -42,11 +42,7 @@ def instances(query, cursor, context):
filtered = query._has_mapper_entities
- single_entity = (
- not query._only_return_tuples
- and len(query._entities) == 1
- and query._entities[0].supports_single_entity
- )
+ single_entity = query.is_single_entity
if filtered:
if single_entity: