Search code examples
orientdb

How do I query orientdb for documents with a certain property


I would like to query for documents that have a certain property.

I tried the following:

select * from Foo where not bar is null

But this returns me the documents even though they do not have that property. Even though it would work it would give the wrong results if there are properties with null as a value (don't know of orientdb works that way).

Is there some way to check for the existence of properties via sql?


Solution

  • try :

    select from Foo where bar is defined