summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-02-24 12:52:12 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2014-02-24 12:52:12 -0500
commitd966920b3df253292a28f2a57bef0d90afd66352 (patch)
tree39e77359d3dfeef97b16ee4eb2768d5276559207 /lib
parent537d9212938669e7140880387d68e769381d5c2e (diff)
downloadsqlalchemy-d966920b3df253292a28f2a57bef0d90afd66352.tar.gz
- Fixed regression from 0.8 where using an option like
:func:`.orm.lazyload` with the "wildcard" expression, e.g. ``"*"``, would raise an assertion error in the case where the query didn't contain any actual entities. This assertion is meant for other cases and was catching this one inadvertently.
Diffstat (limited to 'lib')
-rw-r--r--lib/sqlalchemy/orm/strategy_options.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/strategy_options.py b/lib/sqlalchemy/orm/strategy_options.py
index 6e838ccb7..e290e6597 100644
--- a/lib/sqlalchemy/orm/strategy_options.py
+++ b/lib/sqlalchemy/orm/strategy_options.py
@@ -431,6 +431,8 @@ class _UnboundLoad(Load):
"Wildcard loader can only be used with exactly "
"one entity. Use Load(ent) to specify "
"specific entities.")
+ elif token.endswith(_DEFAULT_TOKEN):
+ raiseerr = False
for ent in query._mapper_entities:
# return only the first _MapperEntity when searching