On Wed, Jul 6, 2011 at 11:50 AM, jMotta <jayrmo...@gmail.com> wrote: > Jamie, > > I don't know if get it right, but if it's part of the key it is not > possible to change. >
It sounds like the id is being stored as a field/property of an entity - it's basically a foreign key. > If this property is not part of the key, then you'll have to deal with it. > Probably you're using some persistence framework such as JDO, JPA or > Objectify. These are probably trying to bind the properties found in the > datastore Entity object into somekind of DTO / POJO through reflection and > then getting this class cast exception. > Jamie, you didn't mention what API you are using to access the datastore. FWIW, Objectify will let you change the field type to a String and do the right thing out of the box. It's a little more tricky if you have an index on that field, but reprocessing the data (thus recreating the index) is pretty simple - just load and save all the entities. No need to go to the low-level api. Unfortunately JDO is more fragile - schema migration doesn't seem to have been planned into the API. Jeff -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.