On Fri, Apr 3, 2009 at 3:38 PM, Larkin2 wrote:
>
> In the example mention at:
> http://code.google.com/appengine/kb/commontasks.html#update
> I don't understand what is going here: comment.comment_text = db.Text
> (updated_comment)
>
> What is db.Text ?
>
> confused, your help is greatly appreci
If you don't have a primary key in your object model you should use key_names.
Don't rely on the object ID's that are given.
To update an object in the datastore you first retrieve it with a query.
Change the members of the object.
and put the object back
phrase = Phrases.get_by_id(2)
# or
phras
Hi,
A small correction in the solution above,
phrase = Phrases.get_by_id(2)
# or
phrase = Phrases.get_by_key_name('my_key_2')
phraseContent = 'typing a longer phrase'
#Correction
#phraseContent.put()
phrase.phraseContent = phraseContent
phrase.put()
or
phrase.phraseContent = 'typing a longer ph