This is pretty bad!

As pointed out 
in https://code.google.com/p/googleappengine/issues/detail?id=8962 , if you 
add a StringListProperty to a model with existing entities in the 
datastore, then you cannot read those entities any more! 
Furthermore, in Java it is apparently possible to write entities with null 
StringListProperty fields.  Those entities cannot then be read from Python! 
These are pretty big problems -- is there any solution? 

Luca

On Tuesday, March 23, 2010 5:57:17 AM UTC-7, Geoffrey Spear wrote:
>
> On Mar 22, 11:09 pm, dhruvbird <dhruvb...@gmail.com> wrote:
> > Hello,
> >   I have a model with a single attribute that is a StringListProperty.
> > I get an error if I define it as such:
> >
> > class Test(db.Expando):
> >     people = db.StringListProperty(required=False, indexed=True)
> >
> > However, on changing it to:
> > class Test(db.Expando):
> >     people = db.StringListProperty(required=True, indexed=True,
> > default=[])
> >
> > It starts working. Any ideas why this is happening??
>
> ListPropertys are always required; you can't set their value to None.
> If a particular entity has no values for the ListProperty, you need to
> set it to the empty list.  (Note that you can still set a default
> value of 'None', which magically uses an empty list, not None, as the
> default value.)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to