[英]OrientDB.RequestError: Cannot find a command executor for the command request: sql.#11.1
I am experimenting with OrientDB (community edition v1.7-rc2) / Oriento (0.4.0) 我正在尝试OrientDB(社区版v1.7-rc2)/ Oriento(0.4.0)
The function 功能
function linkChildToParent(oChild, oParent) {
return (
oDB.edge.from(oChild).to(oParent)
.create({"@class": 'OrgUnit_isPartOf_OrgUnit'})
.tap(log)
.return(oChild)
);
}
Fails with an exception 异常失败
C:\Users\Udo\workspace\NodeOrient\node_modules\oriento\node_modules\bluebird\js\main\async.js:93
throw res.e;
^
OrientDB.RequestError: Cannot find a command executor for the command request: sql.#11.1
at Operation.parseError (C:\Users\Udo\workspace\NodeOrient\node_modules\oriento\lib\transport\binary\protocol\operation.js:806:13)
at Operation.consume (C:\Users\Udo\workspace\NodeOrient\node_modules\oriento\lib\transport\binary\protocol\operation.js:396:35)
at Connection.process (C:\Users\Udo\workspace\NodeOrient\node_modules\oriento\lib\transport\binary\connection.js:324:17)
at Connection.handleSocketData (C:\Users\Udo\workspace\NodeOrient\node_modules\oriento\lib\transport\binary\connection.js:250:17)
at Socket.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:764:14)
at Socket.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:426:10)
at emitReadable (_stream_readable.js:422:5)
at readableAddChunk (_stream_readable.js:165:9)
From previous event:
at Function.Promise$All [as all] (C:\Users\Udo\workspace\NodeOrient\node_modules\bluebird\js\main\promise.js:193:12)
at generateDependents (C:\Users\Udo\workspace\NodeOrient\setupOrgDB.js:202:35)
From previous event:
at Function.Promise$Join [as join] (C:\Users\Udo\workspace\NodeOrient\node_modules\bluebird\js\main\join.js:118:15)
at BinaryTransport.populateDB (C:\Users\Udo\workspace\NodeOrient\setupOrgDB.js:219:20)
So I debugged into the driver till I found 所以我调试了驱动程序,直到找到
function createEdge (db, config, from, to) {
var command = "CREATE EDGE",
className, attributes;
config = edgeConfig(config);
className = config[0];
attributes = config[1];
command += ' ' + className + ' FROM ' + edgeReference(from) + ' TO ' + edgeReference(to);
if (attributes) {
command += ' CONTENT ' + JSON.stringify(attributes);
}
return db.query(command);
}
The content of command right before return db.query(command);
return db.query(command);
之前的命令内容return db.query(command);
is 是
CREATE EDGE OrgUnit_isPartOf_OrgUnit FROM (#11.1) TO (#11.0)
I then used the (browser based) console to verify that OrgUnit_isPartOf_OrgUnit actually inherits from Edge. 然后,我使用(基于浏览器的)控制台来验证OrgUnit_isPartOf_OrgUnit实际上是从Edge继承的。 I also verified that it will link OrgUnit with OrgUnit Vertices and that OrgUnit is derived from Vertex. 我还验证了它将链接OrgUnit与OrgUnit顶点,并且OrgUnit源自Vertex。 I also double verified that records #11.1 and #11.0 are actually present in the database. 我还再次验证了记录#11.1和#11.0实际上存在于数据库中。
Then I issued 然后我发出
CREATE EDGE OrgUnit_isPartOf_OrgUnit FROM (#11.1) TO (#11.0)
directly in the console and got 直接在控制台中
com.orientechnologies.orient.core.command.OCommandExecutorNotFoundException: Cannot find a command executor for the command request: sql.#11:1
This is basically the same exception. 这基本上是相同的例外。 With Google I found some Javadoc for this exception . 通过Google,我发现了一些针对此异常的Javadoc 。 However this did not help me at all. 但是,这完全没有帮助我。
What is wrong and how can I fix it? 有什么问题,我该如何解决?
The right command should be without parenthesis. 正确的命令应该没有括号。 Parenthesis executes sub-queries: 括号执行子查询:
CREATE EDGE OrgUnit_isPartOf_OrgUnit FROM #11:1 TO #11:0
For more information look at Create Edge command. 有关更多信息,请参见创建边缘命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.