I recently added Text field to one of my Entities that cannot be null. I’d like to set a default value for it, so that all of the Entities that I stored before I added the field will be populated with an empty string. Is this possible with JDO?
Share
Yes, though not as trivially as you were probably expecting.
Limitations
takes more then 30 seconds,
unless you run it as a task, in which
case it will time out if it takes
more then 10 minutes.
the entities that need updated since
you can’t query on a property that
doesn’t exist.
Workarounds
appengine-mapreduce project to
get an implementation that can
complete with more then 10 minutes
wall-clock time.
Code