]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Still more wording adjustments when a query option
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 6 Apr 2011 14:36:33 +0000 (10:36 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 6 Apr 2011 14:36:33 +0000 (10:36 -0400)
    can't find the target entity.  Explain that the
    path must be from one of the root entities.

CHANGES
lib/sqlalchemy/orm/interfaces.py

diff --git a/CHANGES b/CHANGES
index 41a890a5aed94ab78196bb8eeb8f826b93c4801d..6a2f45390b51a3691221881df1e0de907a44dbd4 100644 (file)
--- 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.
index fad8a49dd62bc87f035d34088e4457d15ce61c15..fec9d45fc700c685c5ad68854dca70cb00d1811c 100644 (file)
@@ -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