2017-08-31 3 views
0

私はOrientJSで作業していますが、2つのノード間にエッジを作成しようとしています。何日か前までは、すべてのは、以下のスクリプトを使ってうまく働い:OrientjsでEDGEを作成できません

module.exports.insertRelatedToAssociation = (nodeFrom, nodeTo) => { 
    db.create('EDGE', 'RelatedTo') 
     .from(nodeFrom).to(nodeTo) 
     .one() 
     .then(function (result) { 
      return (result !== undefined) 
     })  
} 

しかし、今、私は突然、私はスクリプトを実行たび、このエラーメッセージが表示されます、OrientDBはそのパーサを変更たぶん

com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error parsing query: 
CREATE EDGE RelatedTo FROM #29:5 
    ^
Encountered " <CREATE> "CREATE "" at line 1, column 1. 
Was expecting one of: 
    <SELECT> ... 
    <TRAVERSE> ... 
    <MATCH> ... 
    <INSERT> ... 
    <RETURN> ... 
    <PROFILE> ... 
    <FIND> ... 
    <REBUILD> ... 
    <OPTIMIZE> ... 
    <GRANT> ... 
    <REVOKE> ... 
    <BEGIN> ... 
    <COMMIT> ... 
    <ROLLBACK> ... 
    <IF> ... 
    <SLEEP> ... 
    <CONSOLE> ... 

    DB name="test-graph" 
    at com.orientechnologies.orient.core.sql.parser.OStatementCache.throwParsingException(OStatementCache.java:109) 
    at com.orientechnologies.orient.core.sql.parser.OStatementCache.parse(OStatementCache.java:103) 
    at com.orientechnologies.orient.core.sql.parser.OStatementCache.get(OStatementCache.java:81) 
    at com.orientechnologies.orient.core.sql.parser.OStatementCache.get(OStatementCache.java:64) 
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLAbstract.preParse(OCommandExecutorSQLAbstract.java:232) 
    at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLCreateEdge.parse(OCommandExecutorSQLCreateEdge.java:66) 
    at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLCreateEdge.parse(OCommandExecutorSQLCreateEdge.java:46) 
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:58) 
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:39) 
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3144) 
    at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69) 
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1529) 
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:646) 
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.sessionRequest(ONetworkProtocolBinary.java:384) 
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:207) 
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77) 

を、しかし、私はGitHub Wiki(https://github.com/orientechnologies/orientdb/wiki/OrientDB-2.2-Release-Notes#2226---august-16-2017)には何も見つかりませんでした。

注:私はorientdb-community-importers-2.2.24を実行しています。バージョン2.2.26でも同じです。

答えて

0

エラーが見つかりました。パラメータnodeFromundefinedであっただけです。したがって、undefineddb.create('EDGE','RelatedTo).from(undefined).to(nodeTo)に渡すと、そのエラーが発生します。

関連する問題