开发者

Querying by Key in Google App Engine?

I need to get entity by user key that is setted as Id for User entity. Now I want to query all entities th开发者_运维百科at have same key that user has. How can I do that?


Okey, now I found solution myself:

Query query = pm.newQuery(Entity.class, "user == userParam");
            query.declareParameters("com.google.appengine.api.datastore.Key userParam");            
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜