I have been implementing an app using appengine and am also using JDO.
In one of my entity classes I have a int property:
@Extension(vendorName="datanucleus", key="gae.unindexed", value="true")
@Persistent
int numberToStore;
I was able to store the entity and access this property without any issues.
However, I decided to use the datastore query console and update the value of the numberToStore property from 4 to 5. The type in the "Edit Entity" screen of the console has always been "A number". I now get the following exception in my log whenever I try to access the entity from the datastore:
com.google.api.server.spi.SystemService invokeServiceMethod: cause={0} java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Double at com.google.appengine.datanucleus.TypeConversionUtils$5.apply(TypeConversionUtils.java:121) at com.google.appengine.datanucleus.TypeConversionUtils$5.apply(TypeConversionUtils.java:119)
Why is this issue occurring? Does updating the entity property value from the admin console cause the underlying type of the property to change. Also how can I now undo this type change to this specific property in the entity.