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<String> comments = new ArrayList<String>();

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 :keys.contains(key)")
q.setOrdering("datetime desc");
 q.setRange(0, 5);
results = q.execute(this.comments);

Cursor cursor = JDOCursorHelper.getCursor(results);
 if(cursor != null){
this.cursorString = cursor.toWebSafeString();
}

comments = pm.detachCopyAll((List) results)
comments.size();

return comments
} finally {
pm.close()
 }
}

Can someone tell me why?

-- 
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.

Reply via email to