My problem is pretty much obvious:
TaskDescription
which corresponded to a kind (table) in App Engine Datastore.
Then I've renamed it to TaskContent
and all stored data is seems to be lost now (because class name which is the so-called kind
name is a part of the path to the stored data).Nothing is perfect in this world and I have doubts that it's possible to create all and absolutely correct entities from scratch and never change them after that.
So, how to deal with this issue?
Two ways:
Leave Entities as they are and change the mapping: in objectify you can set the entity to class name mapping: e.g. @Entity(name="EntityName").
Change Entities in the datastore: as datastore is schemaless this can not be done with a simple command. For Entity name change you need to create a new entity, copy all properties and delete the old entity. People usually use a MapReduce jobs to perform datastore maintenance. Here's MapReduce for java.
For field name changes objectify has explicit support for migrating schemas (there is no schemas, but they still call it that way).