如何按值查询边缘属性? [英] How can I query an edge property by value?

查看:256
本文介绍了如何按值查询边缘属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是OrientDB(Community-2.0.9),它有两个顶点:Person和University,一个边缘是:isStudent.边缘isStudent的'mark'属性为float.人-是学生->大学.

I'm using OrientDB (Community-2.0.9) and have two vertices: Person and University and one edge: isStudent. The edge isStudent has the property 'mark' as float. Person --isStudent--> University.

现在,我想选择标记大于3.0的所有人员,但没有结果,但是如果我查询相等性,则会得到两个结果.

Now I want to select all persons, where the mark is greater than 3.0, but I got no results, but if I query for equality I got two results.

您有任何解决方法的想法吗?

Do you have any ideas how to solve this?

查询:

SELECT FROM PERSON WHERE out_isStudent.mark = 3.4 --> two results
SELECT FROM PERSON WHERE out_isStudent.mark > 3.0 --> no results

推荐答案

如果您:

select out_isStudent.mark from Person

您看到它返回列表 [3.4] ,而不是 3.4

you see that it returns the list [3.4] instead of 3.4

由于要比较 [3.4] == 3.4

您可以使用以下方法实现自己想要的:

You can achieve what you want with:

select from Person where out_isStudent[0].mark > 3

这篇关于如何按值查询边缘属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆