在Google App Engine Java本地数据存储中添加/编辑实体

发布于 2024-10-09 14:38:06 字数 630 浏览 1 评论 0原文

以下与 GAE/J 本地开发设置相关:

  1. 如何在本地数据存储中添加/编辑实体(最好使用某些 UI)? _ah/admin 仅允许查看实体。

  2. 在本地 JUnit 测试用例中,如何访问本地 Web 应用程序写入的相同数据存储数据?我按照 http://code.google.com 编写测试用例/appengine/docs/java/tools/localunittesting.html,但测试用例访问的数据与网络应用程序使用的数据不同。

  3. 如何在 clean-build 之间保存本地数据存储数据(现在 local_db.bin 写入目标目录,该目录时不时地被清理)

正在使用的堆栈:

  • Google AppEngine for Java - (gae sdk 1.4/java sdk 6)、
  • Netbeans-6.9.1、
  • Maven-2 (maven-gae-plugin 0.7.3)

Following are related to GAE/J local development setup:

  1. How do i add/edit entities in local datastore (preferably using some UI)? _ah/admin allows only to view entities.

  2. In the local JUnit test cases, how to access the same datastore data that my local web application writes to? I wrote my Test Cases in accordance with http://code.google.com/appengine/docs/java/tools/localunittesting.html but the test cases don't access the same data that the web application uses.

  3. How to save local datastore data between clean-build (right now local_db.bin is written in the target directory which gets cleaned every now and then)

Stack being used :

  • Google AppEngine for Java - (gae sdk
    1.4/ java sdk 6),
  • Netbeans-6.9.1,
  • Maven-2 (maven-gae-plugin 0.7.3)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

背叛残局 2024-10-16 14:38:06
  1. 您当前无法在 Java 本地数据存储查看器中编辑实体。不过,它在待办事项列表中。
  2. 您的单元测试不应依赖于数据存储区的内容:单元测试应该是独立的。
  3. 您也无法执行此操作,除非您在构建过程中对 local_db.bin 进行备份。同样,理想情况下,您应该在设计应用程序时考虑到轻松重新加载数据。
  1. You can't currently edit entities in the Java local datastore viewer. It's in the todo list, though.
  2. Your unit tests shouldn't rely on the contents of the datastore: unit tests are intended to be self-contained.
  3. You can't do this, either, unless you make a backup of local_db.bin part of your build process. Again, you should ideally design your app with easy reloading of data in mind.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文