Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your code looks correct. Do you actually have any instances of <code>MyModel</code> with an <code>intProp</code> of <code>None</code>...?</p> <p><strong>Edit</strong>: 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 not how schema changes in GAE work, per <a href="http://code.google.com/appengine/articles/update_schema.html" rel="nofollow noreferrer">the docs</a>:</p> <blockquote> <p>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.</p> </blockquote> <p>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, &amp;c. We can do it better now. App Engine Fan has a very recent <a href="http://blog.appenginefan.com/2009/08/good-bad-and-lucky.html" rel="nofollow noreferrer">post</a> 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 <a href="http://code.google.com/appengine/articles/remote_api.html" rel="nofollow noreferrer">remote API</a> as the key tool; he also points to <a href="http://code.google.com/p/rietveld/source/browse/trunk/update_entities.py?spec=svn427&amp;r=427" rel="nofollow noreferrer">a module</a> (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 &amp;c instead of Rietveld's, of course).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload