From d966920b3df253292a28f2a57bef0d90afd66352 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 24 Feb 2014 12:52:12 -0500 Subject: - 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. --- lib/sqlalchemy/orm/strategy_options.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') 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 -- cgit v1.2.1