How do I query orientdb for documents without a certain property

亡梦爱人 提交于 2019-12-23 01:12:18

问题


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?


回答1:


try :

select from Foo where bar is defined



回答2:


in case if you want to query for vertices without specific edges

select from Users where first(outE('born_in')).@rid is null


来源:https://stackoverflow.com/questions/26399485/how-do-i-query-orientdb-for-documents-without-a-certain-property

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!