Search code examples
orientdb

Filtering query using outE() with EmbeddedMap


I have a vertex as below.
enter image description here

And I also have an edge (it is an out edge of above vertex) as below.
enter image description here

I can query with following SQL statements.

  • select from #20:6 where outE().weight in 1
  • select from #28:12 where sessionStatus.keys() in "session1"


However when I combined the 2 filters above, there is no vertex out from the query.

  • select from #20:6 where outE().sessionStatus.keys() in "session1"


Is there anyone guide me the correct filter I can use?


Solution

  • you can use MATCH

    select expand(vv) from (
        MATCH
        {
         class: GW_Score,
         as: vv,
         where: (@rid=20:6)
        }
        .outE(){
         as: ee,
         where: (sessionStatus.keys() = "session1")
        }
        RETURN vv
    )