Wednesday, 15 March 2017

Error when creating a record with linklist using OrientJS

I'm trying to save an object to a database using the OrientJS framework on a NodeJS server. This object contains some native parameters as well as an array of RIDs that should point to records of another class. See this:

var myObj = {
   name: 'myNewObjectName',
   '@class': 'OuterClass',
   parameter: ['#225:13']
}

However, when I try to create a new record for this object:

db.record.create(myObj).then(function(record){
   console.log(record);
});

I get the exception:

Unhandled rejection OrientDB.RequestError: For input string: "#225" at child.Operation.parseError (C:\Users\...\node_modules\orientjs\lib\transport\binary\protocol33\operation.js:864:13)
at child.Operation.consume (C:\Users\...\node_modules\orientjs\lib\transport\binary\protocol33\operation.js:455:35)
at Connection.process (C:\Users\...\node_modules\orientjs\lib\transport\binary\connection.js:399:17)
at Connection.handleSocketData (C:\Users\...\node_modules\orientjs\lib\transport\binary\connection.js:290:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:548:20)

So somehow the ID following the Cluster is not passed? Am I doing something wrong, or is this a bug? What else could I do?

Thanks a lot for your help!



via Johannes

No comments:

Post a Comment