Thank you so much!!

On Sep 13, 12:13 pm, Ben Nevile <[email protected]> wrote:
> No, this is wrong.  Your GQL query wasn't working because you didn't
> get() or fetch() a result.
>
> uProfile = PROFILES.gql('...').get()
>
> On Sep 12, 4:13 pm, Larkin2 <[email protected]> wrote:
>
> > I think I answered my own question - I'm retrieving a result set
> > with .gql - to update an entity I need to specifically grab it with
> > get_by_id() or get_by_key()...
>
> > so for example:
>
> > profileToUpdate = PROFILES.gql("WHERE user = :1", user)
> > updatedProfile = profileToUpdate[0].key().id()
> > uProfile = PROFILES.get_by_id(updatedProfile)
> > uProfile.name = self.request.get('name2')
> > db.put(uProfile)
>
> > On Sep 12, 6:53 pm, Larkin2 <[email protected]> wrote:
>
> > > uProfile = PROFILES.gql("WHERE user = :1", user)
> > > uProfile[0].name = self.request.get('name2')
> > > db.put(uProfile)
>
> > > I've been racking my brain for several hours on this - is there
> > > anything in the code above that would prevent this particular entity
> > > in PROFILES from not being updated? I can't get the entity to update
> > > for the life of me.
>
> > > Thanks
>
> > > Larkin
--~--~---------~--~----~------------~-------~--~----~
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