1 Query for all answered Items Then calculate 5 to answer. I don't see any other way to do it. You can't query for "Not" X and get randoms. You are going to have to pick 5 ids. You should assign a key an increment I mean if you want to pick from a list. Each question needs an ID. From: [email protected] [mailto:[email protected]] On Behalf Of DurhamG Sent: Thursday, January 12, 2012 8:37 PM To: [email protected] Subject: Re: [google-appengine] Data schema for showing a user 5 random questions they haven't already answered? This is an app engine group so I thought it was obvious I was asking how to format my data to deal with the limitations imposed by the app engine datastore, not how to solve the problem in general. I don't believe app engine assigns id's going from 1 to N, so I don't think I could use that as my range anyways. I could assign my own id that fits the range, but if multiple questions are added at the same time I risk adding two items with the same id. Not to mention potentially having to deal with deleted questions. That approach seems very un-appengine like and ideally it'd be nice to do it in one query for 5 items instead of 5 queries for 1 item each. Thanks anyways though. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/ZQHxi2TuuZoJ. 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?hl=en.
-- You received this message because you are subscribed to the Google Groups "Google App Engine" 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?hl=en.
