[appengine-java] Adding boolean / int field to data model impossible ?

2010-01-07 Thread Szymon Malok
Hello, I have encountered a problem with adding additional field to my datamodel. I understood that existing entites get null values on added field, but null is not allowed on boolean and int for example? GAE won't even let me iterate entities to update these fields. Well in this case I had

Re: [appengine-java] Adding boolean / int field to data model impossible ?

2010-01-07 Thread Rusty Wright
Use the object types instead of the primitive types; that is, use Boolean instead of boolean, and Integer instead of int. They can be null. Then in your getter for them, check to see if they're null and if so, set them to whatever default value you've chosen, and then return it, unboxed (for