Commits

Mike Bayer committed c9f590a

- 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.

  • Participants
  • Parent commits 1420d09

Comments (0)

Files changed (2)

     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.

File lib/sqlalchemy/orm/interfaces.py

             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