0

I am trying to run a query, that will return only entities that have a missing property.

I have tried this:

query = client.query(kind='IPs')
query.add_filter('property_name','=',None)

But this returns an empty dataset.

Is there any way to do this without inventing another property?

Note: I am using google-cloud-datstore library with python3.6

vladiuz
  • 31
  • 2

1 Answers1

0

No. A case of you don't know what you don't know :-(

Though note there's a difference between an entity not having a property and having the property with a default value.

If an entity does not include the property, the entity is not part of the property's index and thus inaccessible from it.

See: https://stackoverflow.com/a/3332120/609290

DazWilkin
  • 32,823
  • 5
  • 47
  • 88
  • Thank you for your answer! It seems that the solution is providing a default value for a property. Will research this and update. – vladiuz May 05 '19 at 14:28