kocicjelena / google-app-engine-samples

Automatically exported from code.google.com/p/google-app-engine-samples
0 stars 0 forks source link

Shell: entities are immutable in the shell #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
>>> class KpyModifyEntityTest(db.Model): name = db.StringProperty()
>>> e = KpyModifyEntityTest(key_name='key', name='abc')
>>> e.name
'abc'
>>> e.name = 'def'
>>> e.name
'abc'
>>> e.put()
datastore_types.Key.from_path(u'KpyModifyEntityTest', u'key', 
_app_id_namespace=u'shell')
>>> e = KpyModifyEntityTest.get_by_key_name('key')
>>> e.name
u'abc'
>>> e.name = 'def'
>>> e.put()
datastore_types.Key.from_path(u'KpyModifyEntityTest', u'key', 
_app_id_namespace=u'shell')
>>> e = KpyModifyEntityTest.get_by_key_name('key')
>>> e.name
u'abc'
>>> KpyModifyEntityTest(key_name='key', name='xyz').put()
datastore_types.Key.from_path(u'KpyModifyEntityTest', u'key', 
_app_id_namespace=u'shell')
>>> e = KpyModifyEntityTest.get_by_key_name('key')
>>> e.name
u'xyz'

What is the expected output? What do you see instead?
After e.name = 'def', e.name should return 'def'.

What version of the product are you using? On what operating system?
Tried this on shell.appspot.com today (2009-10-14), which is running:
Google Apphosting/1.0
Python 2.5.2 (r252:60911, Apr  7 2009, 17:42:26) 
[GCC 4.1.0]

Original issue reported on code.google.com by zestyping on 14 Oct 2009 at 11:01