Re: [appengine-java] New Data Field NullPointer

2010-01-01 Thread Jeffrey Goetsch
Yes I completely understand why Google Datastore would return nulls. Why doesn't the Datanucleus code handle the nulls appropriately? Datanucleus knows that the object has a primitive, and just take the less robust approach. It could check to see if it is a primitive and check to see if the

[appengine-java] New Data Field NullPointer

2009-12-31 Thread Jeffrey Goetsch
Why do I get a NullPointerException when I add a new primitive field to an object? Why doesn't JDO just recognize that it is a primitive and leave the default value? Thanks, --Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group.

Re: [appengine-java] New Data Field NullPointer

2009-12-31 Thread Rusty Wright
I forgot to add that missing fields are always (I think) returned as null by the datastore. Rusty Wright wrote: It's the GAE datastore. When you add a new field, say an int, it uses null for the missing field in the datastore, then when it tries to unbox it; i.e., ((Integer)