AppEngine: StringListProperty中的项会始终保持相同顺序吗?
我查看了App Engine的文档,关于StringListProperty
和ListProperty
,但似乎找不到关于列表中项目顺序是否有保证的信息。也就是说,我想确认在从数据存储中添加和获取数据时,列表的顺序是否会保持不变:
instance = MyModel()
instance.list_property = ['a', 'b', 'c']
instance.put()
# Retrieve the model again
instance2 = MyModel.get_by_id(instance.key().id())
assert instance2.list_property == ['a', 'b', 'c']
App Engine对列表或字符串列表中的项目顺序有任何保证吗?