0
我基於實體的財產@id
試圖以一個查詢中App Engine
,我不斷收到此錯誤過濾谷歌雲存儲實體通過@id屬性在App Engine中
java.lang.IllegalArgumentException異常: __ __鍵過濾器值必須是一個關鍵
這就是我正在做我的查詢
Filter f1 = new FilterPredicate("personId", FilterOperator.EQUAL,personId);
Filter f2 = new FilterPredicate(Entity.KEY_RESERVED_PROPERTY, FilterOperator.GREATER_THAN,newestCommentId);
Filter filter = CompositeFilterOperator.and(f1,f2);
Query<Record> query = ofy().load().type(Record.class).filter(filter)
.limit(limit).order("-"+ Entity.KEY_RESERVED_PROPERTY);
我想得到的一切>
發送到App Engine的方法最後一個註釋ID
在實體ID字段是這個
我嘗試使用id
第一,但後來我得到一個錯誤說,你不能使用一個文件誰擁有@id,也許我的意思__鍵__
那麼我該如何執行此查詢?
所以一個id是唯一的,但不一定像SQL主鍵一樣。 – tyczj
啊是的,我現在看到了,謝謝! – tyczj