开发者

"BadValueError: Filtering on Text properties is not supported" on a StringProperty using AppEngine

I am running AppEngine locally. I use some filters on the following attribute of my object:开发者_如何学JAVA

class Blah(db.Model):
    access_code = db.StringProperty()

Then I run my filter in the view:

cac = Blah.all().filter(
    'access_code =', 'value_to_find').fetch(1)

When doing so, I get the following error: BadValueError: Filtering on Text properties is not supported.

Even though it's a StringProperty. This never happened before and a few searches on Google didn't help at all. Is anyone having the same issue?


Was the access_code field ever a TextProperty at some point in your application's life? Even if you changed you model definition, any entities that were added to the datastore while it was a Text will remain a Text. You can use the Admin console's data store viewer to look up the specific entity that is causing this problem to make sure that it's access_code field is definitely a StringProperty and not a TextProperty.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜