开发者

Using GQL to check if BlobProperty is NULL

I have a db.BlobProperty property (c开发者_如何学Called "Icon") in my entity which contains an image binary. I want to run a GQL query to retrieve all entities with an image (i.e. their "Icon" property is not NULL).

Trying to use the following query:

"SELECT * FROM Names WHERE Icon!=NULL"

did not work... Trying to use .filter("Icon!=",None) did not work as well...

Any ideas?

Thanks!

Joel


You can't filter on blob properties - they're not indexed. Your best option is to add an indexed boolean property, which indicates if the blob is present or not.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜