开发者

Fix app engine types

开发者 https://www.devze.com 2023-01-22 09:20 出处:网络
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开发者_如何学运维

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?


  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.

0

精彩评论

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