Search code examples
orientdborientdb2.2orientdb-2.1

OrientDb - Conducting a query


I have DB with following schema enter image description here

I want to conduct a query to find all the vertexes which have only 'A' and dont't have 'B' as their descendant (c.out('RepositoryEdge').out('InfoEdge')) For Specific example only vertex #33:53 satisfies this condion

How Should i Conduct My Query ? Thanks in advance


Solution

  • Try this:

    select from <class-name> where @rid not in (select in("InfoEdge").in("RepositoryEdge") from #42:0) and @rid in (select in("InfoEdge").in("RepositoryEdge") from #41:5)
    

    Hope it helps

    Regards