Your code looks correct. Do you actually have any instances of MyModel
with an intProp
of None
...?
Edit: per the OP's comment it's apparently an issue of schema migration; he added a new property and expected existing entities to have it appear (set to None). That's now how schema changes in GAE work, per the docs:
The App Engine datastore doesn't
require all entities to have the same
set of properties. After updating your
models to add new properties, existing
entities will continue to exist
without these properties. In some
situations, this is fine, and you
don't need to do any more work. When
would you want to go back and update
existing entities so they also have
the new properties? One situation
would be when you want to do a query
based on the new properties. In our
example with Pictures, queries like
"Most popular" or "Least popular"
wouldn't return existing pictures,
because they don't (yet) have the
ratings properties. To fix this, we'll
need to update the existing entities
in the datastore.
The essay I'm quoting continues by showing one way to do it, but it's a pretty old-fashioned approach, from before GAE had scheduled tasks, remote apis, &c. We can do it better now. App Engine Fan has a very recent post that shows the general approach (and a mistake he made during his own schema migration, so that others can avoid it!), and points to the remote API as the key tool; he also points to a module (from the Rietveld open source core-review project, initiated by Guido van Rossum, author of Python and a key contributor in the development of App Engine) that does the task neatly and properly (you'll need to tweak that code a little so it uses your models &c instead of Rietveld's, of course).