I have existing entities of a type in my gae datastore to which i want to add a new primitive property of primitive type "long":
@Persistent private long bests = 0;
When I do this, when i try to load existing entities which obviously don't have this property set yet, i get:
java.lang.NullPointerException: Datastore entity with kind Player and key Player("patrick") has a null property named bests. This property is mapped to model.Player.bests, which cannot accept null values.
What can I do to avoid this problem? Like a way to default to zero when field is not existent? I want to avoid using class Long, and stick with using primitive long.