开发者

Add/Edit Entities in google app engine java local datastore

开发者 https://www.devze.com 2023-02-01 12:41 出处:网络
Following are related to GAE/J local development setup: How do i add/edit entities in local datastore (preferably using some UI)? _ah/admin allows only to view entities.

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.h开发者_StackOverflowtml 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)


  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.


Now you can save/load entities using a command line client

0

精彩评论

暂无评论...
验证码 换一张
取 消