在Google App Engine數據存儲建模中,我想問如何檢查類UserProperty的屬性的空值? 例如: 我有這樣的代碼:如何在Google App Engine中檢查UserProperty的空值
class Entry(db.Model):
title = db.StringProperty()
description = db.StringProperty()
author = db.UserProperty()
editor = db.UserProperty()
creationdate = db.DateTimeProperty()
當我要檢查那些有編輯的條目不爲空,我不能用這種GqlQuery
的query = db.GqlQuery("SELECT * FROM Entry " +
"WHERE editor IS NOT NULL" +
"ORDER BY creationdate DESC")
entries = query.fetch(5)
我想知道如果有任何用UserProperty檢查變量存在的方法? 謝謝!
你能澄清一下你的代碼嗎? – Diones 2009-08-09 20:42:04