0
Objectify ofy = objectifyFactory.begin();
        User user= ofy.load().type(User.class).filter("userName", userName).first().now();

しかし、日食はそれを不平を言っていThe method now() is undefined for the type Ref<User>ます。

私は GAE プロジェクトに春の objectify4 を使用しています。

4

2 に答える 2

0

正しい方法は

User user= ofy.load().type(User.class).filter("userName", userName).first().get();
于 2013-09-19T08:45:46.787 に答える
0

Ref にはメソッド now() がありません。ここでその署名を見ることができます:

http://docs.objectify-appengine.googlecode.com/git/apidocs/com/googlecode/objectify/Ref.html

于 2013-09-19T07:23:16.200 に答える