Amy,

Thanks too, especially for information of additionaly syntax.

среда, 15 августа 2012 г., 12:59:08 UTC+6 пользователь Amy Unruh написал:
>
> 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] <javascript:>> 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]<javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> [email protected] <javascript:>.
>> 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 view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/Ma9dulOKGE4J.
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