Re: [appengine-java] working with cursors

2010-03-08 Thread John Patterson
Yeah, I have only seen examples of contains() used with the field name first and then a single value. That could becomes a normal mulit- valued property query. But Im guessing that somewhere your query would have to be converted into an IN query to work. On 9 Mar 2010, at 03:40, atomi wrot

Re: [appengine-java] working with cursors

2010-03-08 Thread atomi
Here is the reworked query for posterity: def getComments() { List comments List results if (this.comments.isEmpty()) { return this.comments } PersistenceManager pm = PMF.get().getPersistenceManager() try { javax.jdo.Query q = pm.newQuery("select from " + Comment.class.getName() + " where hos

Re: [appengine-java] working with cursors

2010-03-08 Thread atomi
Nevermind, I think I got this. Thanks all. On Mon, Mar 8, 2010 at 12:41 PM, atomi wrote: > Sorry to have to ask, But can you hint as to how I should rewrite this > query so as to have cursors working? > > > On Mon, Mar 8, 2010 at 12:40 PM, atomi wrote: > >> Thank you John, I wasn't clear IN was

Re: [appengine-java] working with cursors

2010-03-08 Thread atomi
Sorry to have to ask, But can you hint as to how I should rewrite this query so as to have cursors working? On Mon, Mar 8, 2010 at 12:40 PM, atomi wrote: > Thank you John, I wasn't clear IN was contains() as well. > > > On Mon, Mar 8, 2010 at 12:36 PM, John Patterson wrote: > >> Cursors are not

Re: [appengine-java] working with cursors

2010-03-08 Thread atomi
Thank you John, I wasn't clear IN was contains() as well. On Mon, Mar 8, 2010 at 12:36 PM, John Patterson wrote: > Cursors are not supported for queries that use IN (contains) because under > the covers they are broken into multiple queries and merged together. > > > http://code.google.com/appeng

Re: [appengine-java] working with cursors

2010-03-08 Thread atomi
> > What do you mean by every query result greater than 1? Do you mean that you get "null" if you get a list of comments with a size greater than 1? Yes On Mon, Mar 8, 2010 at 12:25 PM, Ikai L (Google) wrote: > > > On Mon, Mar 8, 2010 at 12:21 PM, atomi wrote: > > I'm trying to get cursors

Re: [appengine-java] working with cursors

2010-03-08 Thread John Patterson
Cursors are not supported for queries that use IN (contains) because under the covers they are broken into multiple queries and merged together. http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Query_Cursors On 9 Mar 2010, at 03:21, atomi wrote: I'm trying to get

Re: [appengine-java] working with cursors

2010-03-08 Thread Ikai L (Google)
What do you mean by every query result greater than 1? Do you mean that you get "null" if you get a list of comments with a size greater than 1? On Mon, Mar 8, 2010 at 12:21 PM, atomi wrote: > I'm trying to get cursors working with a result set but the > JDOCursorHelper.getCursor() method returns

[appengine-java] working with cursors

2010-03-08 Thread atomi
I'm trying to get cursors working with a result set but the JDOCursorHelper.getCursor() method returns null for every query result that is greater than 1 here is my entity method Item entity: @Element(dependent = "true") @Persistent(defaultFetchGroup="true",loadFetchGroup="true") List com