title: Empty list in App Engine Datastore: Java vs Python
body: <p>I have the following java model class in App Engine:</p>
  
  <pre><code>public class Xyz ... {
      @Persistent
      private Set&lt;Long&gt; uvw;
  }
  </code></pre>
  
  <p>When saving an object <em>Xyz</em> with an <strong>empty</strong> set <em>uvw</em> in Java, I get a "<strong>null</strong>" field (as listed in the appengine datastore viewer).
  When I try to load the same object in Python (through remote_api), as defined by the following python model class:</p>
  
  <pre><code>class Xyz(db.Model):
      uvw = db.ListProperty(int)
  </code></pre>
  
  <p>I get a "<em>BadValueError: Property uvw is required</em>".</p>
  
  <p>When saving another object of the same class in Python with an empty <em>uvw</em> list, the Datastore viewer prints a "<strong>missing</strong>" field.</p>
  
  <p>Apparently empty lists storage handling differs between Java and Python and lead to "incompatible" objects.</p>
  
  <p>Thus my question: Is there a way to, either:</p>
  
  <ul>
  <li>force Java to store an empty list as a "missing" field,</li>
  <li>force Python to gracefully accept a "null" list as an empty list when loading the object?</li>
  </ul>
  
  <p>Or any other suggestion on how to handle empty list field in both languages.</p>
  
  <p>Thanks for your answers!</p>