[appengine-java] Re: JPA still has the 1000 record limit in GAE 1.3.1?
Offset get all records from datastore, than skip first n records. You can try to read http://code.google.com/appengine/articles/paging.html On Feb 15, 12:02 am, mjustin wrote: > My application uses JPA and I see the same errors as in version 1.3.0 > now. > > If I count records in a table which has more than 1000 entries, the > result is 1000. > > If I try to start a Query at an offset > 1000, this error occurs: > > Caused by: java.lang.IllegalArgumentException: offset may not be above > 1000 > at > com.google.appengine.api.datastore.DatastoreApiHelper.translateError(Datast > oreApiHelper.java: > 33) > at > com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(Datastor > eApiHelper.java: > 60) > at > com.google.appengine.api.datastore.PreparedQueryImpl.runQuery(PreparedQuery > Impl.java: > 115) > at > com.google.appengine.api.datastore.PreparedQueryImpl.asQueryResultList(Prep > aredQueryImpl.java: > 75) > at > org.datanucleus.store.appengine.query.DatastoreQuery.fulfillEntityQuery(Dat > astoreQuery.java: > 359) > at > org.datanucleus.store.appengine.query.DatastoreQuery.executeQuery(Datastore > Query.java: > 269) > at > org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(Datasto > reQuery.java: > 228) > at > org.datanucleus.store.appengine.query.JPQLQuery.performExecute(JPQLQuery.ja > va: > 77) > at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) > at org.datanucleus.store.query.Query.executeWithMap(Query.java:1398) > at org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:163) > > Does this mean only the native API and JDO can use more than 1000 > records in a query? > > Regards, -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: JPA still has the 1000 record limit in GAE 1.3.1?
Thanks for your answer! My current code uses query.setFirstResult(n), is this still limited to 1000? Your link is rather old and covers Python, but I would like to use JPA with Java. Do I have to use JDO or will JPA drop the 1000 records limit later? Regards, On 15 Feb., 05:31, Timofey Koolin wrote: > Offset get all records from datastore, than skip first n records. > > You can try to readhttp://code.google.com/appengine/articles/paging.html > > On Feb 15, 12:02 am, mjustin wrote: > > > My application uses JPA and I see the same errors as in version 1.3.0 > > now. > > > If I count records in a table which has more than 1000 entries, the > > result is 1000. > > > If I try to start a Query at an offset > 1000, this error occurs: > > > Caused by: java.lang.IllegalArgumentException: offset may not be above > > 1000 > > at > > com.google.appengine.api.datastore.DatastoreApiHelper.translateError(Datast > > oreApiHelper.java: > > 33) > > at > > com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(Datastor > > eApiHelper.java: > > 60) > > at > > com.google.appengine.api.datastore.PreparedQueryImpl.runQuery(PreparedQuery > > Impl.java: > > 115) > > at > > com.google.appengine.api.datastore.PreparedQueryImpl.asQueryResultList(Prep > > aredQueryImpl.java: > > 75) > > at > > org.datanucleus.store.appengine.query.DatastoreQuery.fulfillEntityQuery(Dat > > astoreQuery.java: > > 359) > > at > > org.datanucleus.store.appengine.query.DatastoreQuery.executeQuery(Datastore > > Query.java: > > 269) > > at > > org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(Datasto > > reQuery.java: > > 228) > > at > > org.datanucleus.store.appengine.query.JPQLQuery.performExecute(JPQLQuery.ja > > va: > > 77) > > at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) > > at org.datanucleus.store.query.Query.executeWithMap(Query.java:1398) > > at org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:163) > > > Does this mean only the native API and JDO can use more than 1000 > > records in a query? > > > Regards, > > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: JPA still has the 1000 record limit in GAE 1.3.1?
I don't know about JPA, but with JDO you can use cursors now for simple get more than 1000 records. http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Query_Cursors It new new feauture http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes On Feb 15, 11:20 am, mjustin wrote: > Thanks for your answer! My current code uses query.setFirstResult(n), > is this still limited to 1000? > Your link is rather old and covers Python, but I would like to use JPA > with Java. > Do I have to use JDO or will JPA drop the 1000 records limit later? > > Regards, > > On 15 Feb., 05:31, Timofey Koolin wrote: > > > > > Offset get all records from datastore, than skip first n records. > > > You can try to readhttp://code.google.com/appengine/articles/paging.html > > > On Feb 15, 12:02 am, mjustin wrote: > > > > My application uses JPA and I see the same errors as in version 1.3.0 > > > now. > > > > If I count records in a table which has more than 1000 entries, the > > > result is 1000. > > > > If I try to start a Query at an offset > 1000, this error occurs: > > > > Caused by: java.lang.IllegalArgumentException: offset may not be above > > > 1000 > > > at > > > com.google.appengine.api.datastore.DatastoreApiHelper.translateError(Datast > > > oreApiHelper.java: > > > 33) > > > at > > > com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(Datastor > > > eApiHelper.java: > > > 60) > > > at > > > com.google.appengine.api.datastore.PreparedQueryImpl.runQuery(PreparedQuery > > > Impl.java: > > > 115) > > > at > > > com.google.appengine.api.datastore.PreparedQueryImpl.asQueryResultList(Prep > > > aredQueryImpl.java: > > > 75) > > > at > > > org.datanucleus.store.appengine.query.DatastoreQuery.fulfillEntityQuery(Dat > > > astoreQuery.java: > > > 359) > > > at > > > org.datanucleus.store.appengine.query.DatastoreQuery.executeQuery(Datastore > > > Query.java: > > > 269) > > > at > > > org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(Datasto > > > reQuery.java: > > > 228) > > > at > > > org.datanucleus.store.appengine.query.JPQLQuery.performExecute(JPQLQuery.ja > > > va: > > > 77) > > > at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) > > > at > > > org.datanucleus.store.query.Query.executeWithMap(Query.java:1398) > > > at org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:163) > > > > Does this mean only the native API and JDO can use more than 1000 > > > records in a query? > > > > Regards, -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.