I know it is not possible to query the datastore for missing values (see this question).
What about from python code? Is it possible to check if the value from an entity property comes from the datastore or from the default value?
Use case:
Model Kind_X has 1000 entities. For the property Kind_X.my_property.
- 500 entities do not have my_property
- 400 entities my_property is None
- 100 entities are other values
I would like to set my_property to ABC only for those 500 entities that do not have the property. The 400 entities that have the value None can not be modified.
Note: setting my_property default as ABC is not an acceptable solution.
1 Answer