![](/img/trans.png)
[英]How to prevent creating duplicates of edges between the same vertices in OrientDB?
[英]Duplicated edges with the same @rid in OrientDB
使用OrientDB(community-2.1-rc5)查询Edge类时,发现了一个奇怪的行为。 数据库使用两次相同的@rid和完全相同的数据返回完全相同的边。 我的直觉说这是一个错误...
这是查询
SELECT FROM E WHERE @class='LIKES' AND (out IN [#12:0,#12:221]) AND in=#36:1913
这就是OrientDB Studio返回的结果
http://s29.postimg.org/hwruv0zif/Captura.png
这是没有道理的。 如果我去顶点并查询LIKES关系,它只会返回一个注册表...有人遇到这样的问题吗?
这是我正在使用的数据库,如果有帮助
https://www.dropbox.com/sh/pkm28cfer1pwpqb/AAAVGeL1eftOGR4o0todTiAha?dl=0
要获得有关此错误的帮助,您应该提出加入Google网上论坛的请求。 对于此类错误,StackOverflow并不是寻求帮助的最佳位置。
问题是您以某种方式错误地复制了优势。 Orientdb允许您出于某些未知原因进行操作。
这是有关OrientDB Google组的错误讨论: https ://groups.google.com/forum/#!topic/orient-database/cAR7yUjCZcI
在讨论中,Luca(orientdb的创建者)说:
"the problem is that without a transaction the creation of edge could
be dirty. OrientDB tries to fix dirty reference, so maybe that's the
reason why the next time the exception is raised. I've changed the
default behavior of all SQL commands against Graphs to be always
transactional"
升级到orientdb的最新版本将是一个理想的选择。 该错误可能已修复。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.