本地数据存储在应用程序重新启动之间不会持久 [英] Local datastore not persisted between application restarts
问题描述
我从 Google开发人员代码实验室运行GuestBook示例。
I am running the GuestBook example from Google Developer CodeLab.
添加条目时,它会显示在问候列表中和本地数据存储区
When adding an entry, it shows up in the list of greetings and in the local datastore
到目前为止这么好......
So far so good...
当我重新启动应用程序,但是,只有某些条目仍然存在,而一些完全消失,无论是从我的应用程序维护的列表还是从本地数据存储区在上面的链接中。
When I restart the application, however, only some of the entries still exist, while some disappear entirely, both from the list maintained by my app, and from the local datastore, as seen in above link.
我使用Google的插件来开发和测试我的应用程序。
I am using the google plugin for Eclipse to develop and test my application.
Can任何人都指向正确的方向?
Can anyone point me in the right direction?
推荐答案
很可能您正在传递 - clear- datastore
参数,可以直接或通过启动程序访问 dev_appserver
。另一种可能是某些内容正在擦除临时目录(例如重新启动时),这是dev_appserver本地数据存储的默认位置。
It's likely you're passing the --clear-datastore
argument, either directly or through the launcher, to the dev_appserver
. Another possibility is that something is erasing your temporary directory (such as on reboot), which is the default location for the dev_appserver's local datastore.
我不知道会发生什么导致只有一些实体消失,并且不可能在没有看到您的代码的情况下说。我也不知道你的应用程序维护的列表是什么意思。
I don't know what would cause only some entities to disappear, and it's impossible to say without seeing your code. I also don't know what you mean by "the list maintained by [your] app".
这篇关于本地数据存储在应用程序重新启动之间不会持久的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!