【问题标题】:Objectify Appengine should query a few rowsObjectify Appengine 应该查询几行
【发布时间】:2014-05-31 09:52:18
【问题描述】:

有没有办法使用 Objectify v5 加载固定数量的最近保存的行/数据?

例如,我只想加载 10 个。

查询

HumanEntity human = ofy().load().type( HumanEntity.class );

在这里添加什么?

【问题讨论】:

    标签: java google-app-engine objectify


    【解决方案1】:

    找到了!

    Query<HumanEntity> human = ofy().load().type( HumanEntity.class ).limit( 10 );
    

    【讨论】:

      猜你喜欢
      • 2012-09-28
      • 1970-01-01
      • 2011-06-29
      • 2016-01-01
      • 2012-08-22
      • 1970-01-01
      • 2012-04-30
      • 2012-12-17
      • 1970-01-01
      相关资源
      最近更新 更多