I have existing type objects in my gae datastore, to which I want to add a new primitive property of the primitive type "long":
@Persistent private long bests = 0;
When I do this, when I try to load existing objects that obviously do not yet have this property, I get:
java.lang.NullPointerException: A Datastore object with a good player and a key player ("patrick") has a null property called bests. This property maps to model.Player.bests, which cannot accept null values.
What can I do to avoid this problem? How is the default method for zero when the field does not exist? I want to avoid using the Long class and stick with using the primitive for a long time.
source
share