This is not true. They are equivalent. They modify the query IN-PLACE. They do not return a new one. All the db.Query methods return self. You can choose to chain them all in one line or in separate lines. No need to assign to the items variable after the create call [ Item.all() ].
2011/1/23 Claude Vedovini <[email protected]>: > I also noticed that your code to retrieve the records from the DB is > wrong, this won't work as you expect: > > items = Item.all() > items.filter("type =", merchandise_type) > items.order("-points") > > because filter and order methods do not modify the query, they return > a new one, so your code be: > > items = Item.all() > items = items.filter("type =", merchandise_type) > items = items.order("-points") > > or the shorter > > items = Item.all().filter("type =", merchandise_type).order("-points") -- 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.
