Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google app engine: How do I add fields to an existent entity

I have a google app engine app where I would like to extend one of my Entity definitions. How would I ensure existent entity objects get the new fields properly initialized? Would the existent objects, the next time I query them, simply have default values? I'd like to add a StringListProperty.

like image 824
Joey Avatar asked Dec 29 '22 09:12

Joey


1 Answers

If you add a new property to your model, existing entities will have the default value for it when you load them, if you supplied a default. They won't show up in queries for that value until you fetch them and store them again, though.

like image 168
Nick Johnson Avatar answered Jan 13 '23 12:01

Nick Johnson