So if I have a class of which I have a number saved in a datastore, and then seek to add a field later, how can I prevent all my previous objects breaking? Is there a way to retroactively set those fields so they're not null?
I'm using JDO.
So if I have a class of which I have a number saved in a datastore, and then seek to add a field later, how can I prevent all my previous objects breaking? Is there a way to retroactively set those fields so they're not null?
I'm using JDO.
It depends on how you are accessing the datastore. Which runtime (python/java) and which API are you using to access the datastore? The datastore itself is schemaless, so it dosen't care what is or isn't in a certain entity. On the Java side, if you use the low level datastore API, you wouldn't have any problems accessing the "old" entities and adding in the data you want to. However, if you are using JDO or JPA to access the datastore, you might get errors accessing the entities with missing data.