There is probably something wrong in your actual update code. The
following works for me:
class T(db.Model):
text = db.TextProperty()
t = T(text="test text").put()
t2 = T.get(t)
print t2.text
t2.text = "my new text"
t2.put()
t3 = T.get(t)
print t3.text
Robert
2011/1/24 saintthor <[email protected]>:
> class DjPost( db.Model ):
> ParentId = db.IntegerProperty()
> Board = db.IntegerProperty()
> Author = db.ReferenceProperty( DjUser )
> AuthId = db.IntegerProperty()
> Title = db.StringProperty()
> DtTm = db.DateTimeProperty()
> Status = db.IntegerProperty()
> Text = db.TextProperty()
>
> i think if there were any error, a ecxeption should occur.
>
> On 2010年12月24日, 下午4时44分, Robert Kluin <[email protected]> wrote:
>> With theses types of questions, it would help us help you if you
>> included your model definition.
>>
>> Are your field names really capped like that? 'Text', 'Status'?
>>
>> Assuming 'Text' is a db.TextProperty, try setting it like so:
>>
>> Post.Text = db.Text(u'asdfghasdfgh')
>>
>> http://code.google.com/appengine/docs/python/datastore/typesandproper...
>>
>> Is 'Status' an int or what?
>>
>> Robert
>>
>> On Thu, Dec 23, 2010 at 09:32,saintthor<[email protected]> wrote:
>> > code as
>>
>> > Post = DjPost.gql( "where DjID = 60690" ).get()
>> > Post.Text = u'''xxxxxxxxxxxxxxxxxxx'''
>> > Post.Status += 1000
>> > Post.put()
>>
>> > no error occurs. i set about 14000 entities, 2 of them Text and Status
>> > were not set.
>>
>> > --
>> > 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
>> > athttp://groups.google.com/group/google-appengine?hl=en.
>
> --
> 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.
>
>
--
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.