[Sqlalchemy-tickets] Issue #3249: disable multirow eager loaders based on uselist instead of MANYTO
Brought to you by:
zzzeek
|
From: Mike B. <iss...@bi...> - 2014-11-12 22:15:14
|
New issue 3249: disable multirow eager loaders based on uselist instead of MANYTOONE? https://bitbucket.org/zzzeek/sqlalchemy/issue/3249/disable-multirow-eager-loaders-based-on Mike Bayer: why not? this makes it higher risk if someone is using uselist improperly, but if they are doing that then they are getting warnings anyway. all the tests pass except one that is looking for exact SQL. ``` #!diff diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py index d95f17f..9549e09 100644 --- a/lib/sqlalchemy/orm/strategies.py +++ b/lib/sqlalchemy/orm/strategies.py @@ -1246,7 +1246,7 @@ class JoinedLoader(AbstractRelationshipLoader): anonymize_labels=True) assert clauses.aliased_class is not None - if self.parent_property.direction != interfaces.MANYTOONE: + if self.parent_property.uselist: context.multi_row_eager_loaders = True innerjoin = ( ``` |