Lapteuh,

Thanks very much for taking the time to report that issue, and give a
corrected version--  we always appreciate that. The fix for this
documentation error is already in the works, and should be out with the
upcoming release.
Btw, this slightly simpler syntax should also work:
qry = Article.query().fetch(10, projection=[Article.author, Article.tags])

 -Amy


On 15 August 2012 02:54, Lapteuh <[email protected]> wrote:

> I found error in primer at 
> page<https://developers.google.com/appengine/docs/python/ndb/queries#projection>
> .
>
> Incorrect version:
> qry = Article.query(projection=[Article.author, Article.tags])
> articles = qry.fetch(20)
>
> Correct version of primer
> qo = ndb.QueryOptions(projection=['author', 'tags'])
> qry = Article.query()
> articles = qry.fetch(20, options=qo)
>
> Maybe that help someone.
> Sorry for my english.
>
> --
> 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/-/mIYyrcVPATgJ.
> 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.

Reply via email to