English 中文(简体)
如何核对案文无效或未使用JDO
原标题:How to check the Text is null or not using JDO

我写这些法典

Query q = pm.newQuery(User.class);
q.setFilter("textPosts != null"); // textPosts is a Text
List<User> users = (List<User>) q.execute();
resp.getWriter().println("user num: " + users.size());

而且,我已经来到这里。

user num: 0

I m sure that the number should greater than 0.
I probably miss something important.
Thanks in advance!

最佳回答

Querying Unindexed nature :

<编码> 关于财产问题的过滤令或分类令从来不会使实体与无索引的财产相匹配。

因此,找不到贵实体是因为案文性质从未指数化。

这一点也具有相关性(但就你的情况而言,案文是没有索引的优胜数),

<编码> 搜索引擎数据库对没有特定财产的实体与对财产的无价实体加以区分。 JDO不支持这一区别:物体的每一领域都有价值,可能无效。

So if you have an Entity without a property, then it will not be found with a query, since a query requires that the property exists.

问题回答

Maybe,Text

Btw, i 确信它必须对本案作出例外规定。





相关问题
How to make logging.debug work on Appengine?

I m having a tough time getting the logging on Appengine working. the statement import logging is flagged as an unrecognized import in my PyDev Appengine project. I suspected that this was just an ...

gqlQuery returns object, want list of keys

Is there a way to convert the GqlQuery object to an array of keys, or is there a way to force the query to return an array of keys? For example: items = db.GqlQuery("SELECT __key__ FROM Items") ...

Integrating Google AppEngine with a Thick Client

I want to make a multi-user client-server solution with Java Swing thick client as a front-end and Google AppEngine (Java one) as a back-end. The problem is that GAE provides only web-based forms for ...

sorl.thumbnail : thumbnail is not a valid tag library?

I am trying to install sorl.thumbnail but am getting the following error message: thumbnail is not a valid tag library: Could not load template library from django.templatetags.thumbnail, No module ...

热门标签