I am indeed using JDO so I'm kinda bummed that a simple schema change like this is causing problems.
Haven't used Objectify before but it sounds like it might do what I need. I'm simply changing the type of a field/property (not part of the key) from Integer to String. The issue is I have a LOT of existing entries, so I need to figure out the best way to store new entities using String for that property, but still be able to read old entities that have that value stored as an Integer. Sounds like Objectify might be my only choice? I had another idea which involved using a new property with type String. That way, new entities would have the new property filled, while old entities would have the original property filled. The application code would need to handle this. Kinda ugly and hackish though. On Jul 6, 4:34 pm, Jeff Schnitzer <[email protected]> wrote: > On Wed, Jul 6, 2011 at 12:56 PM, jMotta <[email protected]> wrote: > > * > > * > > *Jeff*, > > > You've said: "Objectify will let you change the field type to a String and > > do the right thing out of the box.", how? > > > I know that's possible through @AlsoLoad annotation to override the default > > behavior of binding properties based on the member name. But what I > > understood about his need is that actually he have entities whose the > > property names are equals but with different object types as values. So, the > > only class shared in the String vs Long hierarchy will be Object. > > The conversion process will merrily convert just about anything to a String. > So going from Long -> String is easy. The other way 'round, you would need > to use the @AlsoLoad mechanism. > > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
