I have updated my model in Datastore so now it has an additional field. Now I have entities with and without that field but I need to add this field to all entities that don’t yet have it. Idea is to get entities in a function without that field and add it. So, I wonder how I can filter such entities in Datastore requests?
Share
You cannot filter for property non-existence. Every query must be satisfied by an index, and there’s no “negative index” of entities that lack a given property.
Generally, you’ll need to iterate over all entities, and just ignore the ones that already have the property.