You can't order by a property with a name attribute.  See bugs 3228
and 3693 for details.
  http://code.google.com/p/googleappengine/issues/detail?id=3228
  http://code.google.com/p/googleappengine/issues/detail?id=3693

Looks like Query.order checks that the property name is in the
model.properties().  properties() returns the full names, not the
short names so this does not work.  Query.filter() does not perform
this test.  Is there any way we could get this patch (or a better fix)
applied for the 1.4 release?

Robert




--- google/appengine/ext/db/__init__.py.busted  2010-11-18
13:44:32.000000000 -0500
+++ google/appengine/ext/db/__init__.py 2010-11-23 00:31:23.000000000 -0500
@@ -2225,8 +2225,7 @@
             datastore_types._KEY_SPECIAL_PROPERTY)
     else:
       if not issubclass(self._model_class, Expando):
-        if (property not in self._model_class.properties() and
-            property not in datastore_types._SPECIAL_PROPERTIES):
+        if property in datastore_types._SPECIAL_PROPERTIES:
           raise PropertyError('Invalid property name \'%s\'' % property)

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to