Orientdb 中的类型转换

Type conversion in Orientdb

我在 Orientdb 中有一个这样的查询:

select out('E_MyEdge').@rid, creationUser from V_MyVertex where out('E_MyEdge').@rid <> creationUser

V_MyVertex是顶点,E_MyEdge是边。 creationUser 是来自 V_MyVertex 的 "LINK" 类型的 属性,它是 "rid"(类似于“#12:4”)。问题是结果中的两列都是 "rid",但查询 returns 也是具有相同值的行(例如 #12:117 | #12:117),我不知道不知道如何从结果中排除它们。

你可以使用

select out('E_MyEdge').@rid, creationUser from V_MyVertex where out('E_MyEdge').@rid NOT IN creationUser

希望对您有所帮助