I agree.  Named properties are messy, it is not always clear which
"name" (short or long) should be used.  Also, just as a note, if you
make your model and exando you can use the short name in the order.


Robert






On Tue, Nov 23, 2010 at 08:51, Peter Petrov <[email protected]> wrote:
> Hey Robert, thanks very much for tracking and fixing this (I'm the one who
> reported the second issue).
> Dear Googlers, _please_ finally notice this and fix it. Named properties are
> nearly useless anyway, even without this bug (because the name attribute is
> not transparent as it should be, you still need to modify your queries).
>
> On Tue, Nov 23, 2010 at 7:43 AM, Robert Kluin <[email protected]>
> wrote:
>>
>> 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.
>>
>
> --
> 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.
>

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