From: Mike Bayer Date: Wed, 6 Apr 2011 14:36:33 +0000 (-0400) Subject: - Still more wording adjustments when a query option X-Git-Tag: rel_0_7b4~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed5783772dff7bdef9de381dd0fb5c70adc89995;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Still more wording adjustments when a query option can't find the target entity. Explain that the path must be from one of the root entities. --- diff --git a/CHANGES b/CHANGES index 41a890a5ae..6a2f45390b 100644 --- a/CHANGES +++ b/CHANGES @@ -34,6 +34,10 @@ CHANGES is attempted of a subclass that is not polymorphic against the supertype. [ticket:2063] + - Still more wording adjustments when a query option + can't find the target entity. Explain that the + path must be from one of the root entities. + - sql - Restored the "catchall" constructor on the base TypeEngine class, with a deprecation warning. diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py index fad8a49dd6..fec9d45fc7 100644 --- a/lib/sqlalchemy/orm/interfaces.py +++ b/lib/sqlalchemy/orm/interfaces.py @@ -437,7 +437,9 @@ class PropertyOption(MapperOption): if raiseerr: raise sa_exc.ArgumentError( "Can't find property '%s' on any entity " - "specified in this Query." % (token,) + "specified in this Query. Note the full path " + "from root (%s) to target entity must be specified." + % (token, ",".join(str(x) for x in query._mapper_entities)) ) else: return None