That's what I had at the beginning, and it breaks. 
This is a bit of a sad situation, as it breaks interoperability in simple 
ways, but I will try the suggestion of reading without a model and then 
writing with a model to do an update.  I don't love it, as it makes the 
code ugly and not maintainable... my esthetic side really wishes for this 
bug to be fixed. 

Luca

On Wednesday, July 10, 2013 10:32:37 PM UTC-7, timh wrote:
>
> What about just dropping the required parameter from the property have you 
> tried that.
>
>
>
> On Thursday, July 11, 2013 12:00:17 AM UTC+8, Luca de Alfaro wrote:
>>
>> I tried to use both default=[] (which did not stop the error from 
>> occurring), and required=False (which generated a new error, as the only 
>> value allowed for "required" is True). 
>> So it appears that the old solutions for this bug are not viable.  
>> A mapreduce would cost a lot of money given the large amount of data 
>> involved. 
>>
>> This is quite a serious bug in my opinion, as it prevents 
>> interoperability between Python and Java, as well as updating the structure 
>> of entities.  I wonder if there is any hope that the AppEngine team take it 
>> up and fix it? 
>>
>> Luca
>>
>> On Wednesday, July 10, 2013 12:13:55 AM UTC-7, Moises Belchin wrote:
>>>
>>> Consider using required=False and default=None or default=[] to avoid 
>>> these problems.
>>> Other way is to use GenericProperty, use MapReduce to convert data from 
>>> one type to another then change the property type, required, defaults, etc.
>>>
>>> Good luck !
>>>
>>>
>>> Saludos.
>>> Moisés Belchín.
>>>
>>>
>>> 2013/7/10 timh <zute...@gmail.com>
>>>
>>>> Alternately make the property not required  (required=False), load the 
>>>> entities set the value of the list to a [] and then rewrite, once you have 
>>>> migrated all the entities you can then
>>>> set the property to be required.
>>>>
>>>> You do need to think about model migration when changing classes 
>>>> adding/removing or changing the types of properties.
>>>>
>>>> T
>>>>
>>>>
>>>> On Wednesday, July 10, 2013 3:07:25 PM UTC+8, timh wrote:
>>>>>
>>>>> Have you tried setting the default value to [] as per that error ?
>>>>>
>>>>> If your model is blowing up you can always fetch the underlying data 
>>>>> without a model, fix the data up and write it back.
>>>>>
>>>>> T
>>>>>
>>>>> On Wednesday, July 10, 2013 9:56:50 AM UTC+8, Luca de Alfaro wrote:
>>>>>>
>>>>>> This is pretty bad!
>>>>>>
>>>>>> As pointed out in https://code.google.com/p/**
>>>>>> googleappengine/issues/detail?**id=8962<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-appengi...@googlegroups.com.
>>>> To post to this group, send email to google-a...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/google-appengine.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>  
>>>>  
>>>>
>>>
>>>

-- 
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