Using Java, Google App Engine and it's Datastore. I know plenty of these questions have been asked before, but I can't quite grasp if what I'm doing is possible or not, or of I'm doing it the wrong way.
What I want to do: Let's say I have 100s of questions each one as a Question-entity. I want a user to download for example 20 questions and answer them. Then later on the user is supposed to download another 20 questions, but I want to make sure it's not the same questions as the ones before. What's the best approach?
I'm currently sending the user 20 questions and each question has a unique ID. Then when they request 20 more questions the user also sends back which questions he answered (in other words the IDs of the 20 questions). When I then make the "query" to retrieve 20 new questions I set a filter by calling query.setFilter("id != 1 && id != 2 && ... && id != 20"). Here's the "problem", is there a limit as to how many '!=' (NOT EQUAL) I can have in this kind of query? Because the 3rd time a user request new questions the filter is not only 20 conditions long, it's instead 60 conditions long. Is this possible? And is it a valid way of doing things? Does the '!=' create a new subquery each time it's used?
Thank you!