2009-05-21 10 views
0

私は次の問題に遭遇します。私は何かが欠けていたか?フィルタは文字列を返しません。

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

はGAEわからないが、 "=" の代わりに "==" すべきですか? – user49117

答えて

5

「server_url」はどのようなプロパティですか?

TextPropertyの場合、フィルタでは使用できません。

StringPropertyとは異なり、TextProperty の値は500バイトを超えることができます。 ただし、TextPropertyの値は であり、フィルタ またはソート順では使用できません。

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

+0

ユーザーが公式フォーラムに同じことを投稿しました。これが解決策でした。 –

関連する問題