Thanks for the idea Ian, but I didn't have any luck. I changed to this: List AllGameDataResults = (List)getAllGameDataQuery.executeWithMap(args);
However, I'm still not getting a cursor. Thanks, Jason On Oct 19, 6:11 am, Ian Marshall <[email protected]> wrote: > Instead of > > List<AllGameData> AllGameDataResults = > (List<AllGameData>)getAllGameDataQuery.executeWithMap(args); > ... > Cursor newCursor = JDOCursorHelper.getCursor(AllGameDataResults); > > have you tried > > List AllGameDataResults = > (List)getAllGameDataQuery.executeWithMap(args); > ... > Cursor newCursor = JDOCursorHelper.getCursor(AllGameDataResults); > > This is what I do. I seem to remember that by using your equivalent of > List<AllGameData> the method JDOCursorHelper.getCursor(...) did not > work for me. > > Enjoy? > > On Oct 19, 3:18 am, "hendrix.jason" <[email protected]> wrote: > > > > > > > > > When I execute: > > Cursor newCursor = JDOCursorHelper.getCursor(<results variable>); > > > newCursor is always null even though there are valid results returned > > and there are more in the datastore that fit the query. > > > Since I am filtering multiple times on the same property, is this > > query getting treated as an "IN" query (and therefore not compatible > > with cursors)? > > > If so, is there a way I can get around it? > > > If not, what did I do wrong? > > > Query getAllGameDataQuery = pm.newQuery(AllGameData.class, > > "this.gameDate == d1 " > > + "|| this.gameDate == d2 " > > + "|| this.gameDate == d3 " > > + "|| this.gameDate == d4 " > > + "|| this.gameDate == d5 " > > + "|| this.gameDate == d6 " > > + "|| this.gameDate == d7"); > > > getAllGameDataQuery.declareParameters("String d1, String > > d2, String > > d3, String d4, String d5, String d6, String d7"); > > > Map<String, String> args = new HashMap<String, String>(); > > args.put("d1", dateArray[0]); > > args.put("d2", dateArray[1]); > > args.put("d3", dateArray[2]); > > args.put("d4", dateArray[3]); > > args.put("d5", dateArray[4]); > > args.put("d6", dateArray[5]); > > args.put("d7", dateArray[6]); > > > //Get only 20 results at a time > > getAllGameDataQuery.setRange(0, 20); > > // If this servlet is passed a cursor parameter, let's use > > it > > if (startCursor != null) { > > Cursor cursor = > > Cursor.fromWebSafeString(startCursor); > > Map<String, Object> extensionMap = new > > HashMap<String, Object>(); > > extensionMap.put(JDOCursorHelper.CURSOR_EXTENSION, > > cursor); > > getAllGameDataQuery.setExtensions(extensionMap); > > } > > > @SuppressWarnings("unchecked") > > List<AllGameData> AllGameDataResults = (List<AllGameData>) > > getAllGameDataQuery.executeWithMap(args); > > > String newCursorString = ""; > > try{ > > Cursor newCursor = > > JDOCursorHelper.getCursor(AllGameDataResults); > > if(newCursor!=null){ > > newCursorString = > > newCursor.toWebSafeString(); > > } > > } -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
