On Tue, Apr 6, 2010 at 5:47 PM, timwhunt <[email protected]> wrote: > Thanks Nick!! > > So to make sure I understand: > > In the last step of your process for getting a list of unread > articles, I'd first get the 'UserArticle' entities marked as Unread, > and I'm assuming each UserArticle entity would contain the key for the > actual article entity.
Correct - or better, the key name of the UserArticle could be the same as the key name of the article. If you use the mere existence of a UserArticle to indicate an article is unread, you can even do a keys-only query, using Brett's 'relation index' pattern. > So I'd get the Unread UserArticles and then > loop through them in my code to retrieve the article content/text for > display using the article entity's keys. Correct, though you should do this using a batch get, to minimise roundtrips. > The main point is the need > for a two step process - First get the UserArticle entities marked > unread, then get the actual article content by looping through the > unread UserArticle entities. I understand retrieving by key is fast, > and think I can also provide a list of keys in one operation to make > it even faster, but I want to make sure I understand it's a two step > process. > Correct. > > Also, the Unseen status is never marked as such in any entity, rather > it's the category of articles I'm getting in step 2 of your process, > for which I'll create UserArticle entities marked Unread. Right? > Right. 'unseen' is simply all posts newer than the last one you processed for this user. -Nick > > Thanks again! > Tim > > -- > 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]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- 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.
