It is clear, yes but why i was not able to change data.
It when thru ok but did not change data.
With my version it goes fine and changed data is saved in entity.
I think i messed up somewhere.

Thanks for response.

W dniu 28 października 2009 17:38 użytkownik johntray <john.tur...@gmail.com
> napisał:

>
> In
> http://code.google.com/appengine/docs/python/datastore/creatinggettinganddeletingdata.html#Getting_Entities_Using_a_Query
> ,
> there is a note stating that query objects have an interator
> interface, and that "If the query object is used as an iterator, the
> query is executed with no limit or offset, the results are loaded into
> memory, and the value returned is an iterator over the results."
>
> So no, the documentation isn't wrong, just hard to follow in some
> places.
>
>
>
>
> On Oct 28, 11:45 am, Michał Klich <klich.mic...@gmail.com> wrote:
> > Hi,
> >
> > While looking on docs for datastore at this websitehttp://
> code.google.com/appengine/docs/python/datastore/creatinggettin...
> >
> > I found code:
> >
> > if users.get_current_user():
> >   user_pets = db.GqlQuery("SELECT * FROM Pet WHERE owner = :1",
> >                           users.get_current_user())
> >   for pet in user_pets:
> >     pet.spayed_or_neutered = True
> >
> >   db.put(user_pets)
> >
> > Correct me if i am wrong but should not be it like:
> >
> > if users.get_current_user():
> >   user_pets = db.GqlQuery("SELECT * FROM Pet WHERE owner = :1",
> >                           users.get_current_user())
> >   results = user_pets.fetch(10)
> >
> >   for pet in results:
> >     pet.spayed_or_neutered = True
> >
> >   db.put(results)
> >
> > I could not make it to work in original version but mnaybe i am wrong, i
> > spent way too much time on this trying to figure it out.
> >
> > --
> > Michał Klich
> >
> > klich.mic...@gmail.com
> > mic...@michalklich.comhttp://www.michalklich.com
> >
>


-- 
Michał Klich

klich.mic...@gmail.com
mic...@michalklich.com
http://www.michalklich.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to