[google-appengine] Re: ReferenceProperty prefetching: am I doing it backwards?

2010-06-01 Thread Tim Hoffman
Hi yep, I did refer to Nicks blog, which is a much better approach. Thanks for pointing that out. Rgds T On Jun 1, 6:01 pm, djidjadji wrote: > Hi Tim, > > It's not recommended practice to use the Model._property members of the > object. > These variables are implementation dependent. > Better

Re: [google-appengine] Re: ReferenceProperty prefetching: am I doing it backwards?

2010-06-01 Thread djidjadji
Hi Tim, It's not recommended practice to use the Model._property members of the object. These variables are implementation dependent. Better to use the get_value_for_datastore() method of the Property. 2010/6/1 Tim Hoffman : > Yep you are doing it wrong. > > You have > > tagresults = models.Tag.a

[google-appengine] Re: ReferenceProperty prefetching: am I doing it backwards?

2010-06-01 Thread Tim Hoffman
Yep you are doing it wrong. You have tagresults = models.Tag.all().order(sort_order).filter("name = ",tag_name).fetch(10) article_keys = [f.article.key() for f in tagresults] The minute you reference f.article you have dereferenced article and now have the object, then you are fetching i