views:

25

answers:

1

I recently made a change to one of my app engine models. I changed a Key field to a String. I forgot to remove all the old records. I have already added new records that have strings in the key fields. If I do a query for all the records I get an error, can not cast Key to String. If I try and change the class back to the old way I get can not cast String to Key. All this info is on the local file. How can I delete this data and start fresh?

+3  A: 
  1. When you say "local file" you mean in local development server? If yes,
    • then the local development GAE server also comes with a Admin console which you can use to view and edit the data store. Its located at http://localhost:8080/_ah/admin (check port number)
    • alternately you can restart your GAE and the local data would be wiped off
  2. If no,
    • You have an admin console un app engine (view it in your app's dashboard). You can execute queries to modify data store from there
    • worst case, you can write a small servlet that will execute "delete" queries for the data that you dont want and execute that servlet

I'm assuming that your interest is NOT is supporting both the use cases - hence not thinking about that here.

madhurtanwani