views:

87

answers:

1

I run into follow problem. Did I miss anything?

Association.all().count()
1

Association.all().fetch(1)
[Association(**{'server_url': u'server-url', 'handle': u'handle2', 'secret': 'c2VjcmV0\n', 'issued': 1242892477L, 'lifetime': 200L, 'assoc_type': u'HMAC-SHA1'})]

Association.all().filter('server_url =', 'server-url').count()
0  # expect 1

Association.all().filter('server_url =', u'server-url').count()
0 # expect 1

Association.all().filter('issued >', 0).count()
1
+5  A: 

What kind of property is "server_url"?

If it is a TextProperty, then it cannot be used in filters.

Unlike StringProperty, a TextProperty value can be more than 500 bytes long. However, TextProperty values are not indexed, and cannot be used in filters or sort orders.

http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html#TextProperty

mlsteeves
User posted the same thing on the official forums; this was the solution.
Nick Johnson