I am pretty new to sailsJS and Neo4J, my roadblock is to create relation between two nodes with reference ID.
My Code Sample :
params.id = 'b8995544-02fc-4148-807f-d9c9f0ebd60f';
var q = [
'MATCH (w:word{id:'+ JSON.stringify(params.id)+ '}),(a:audiofiles{wordId:'+JSON.stringify(params.id)+'}) CREATE (w)-[r:HASMANY]->(a) RETURN r'
];
connections[connection].connection.query(q.join(' '), {}).then(function (result) {
console.log(result);
cb(null, result);
}, function (err) {
cb(err, null);
console.log(err);
});
My Output is something:
[ 'MATCH (w:word{id:"faedcf89-b323-48f4-9c29-f4396822f83c"}),(a:audiofiles{wordId:"faedcf89-b323-48f4-9c29-f4396822f83c"})
CREATE (w)-[r:HASMANY]->(a) RETURN r' ]
{ columns: [ 'r' ],
data: [],
status:
{ httpCode: '200',
statusCode: '200',
httpMessage: 'OK',
httpDescription: 'Request succeeded without error' } }
Even then it is not creating relation at Neo4J any issue, I am unable to debug at this framework. Can any one help me what is the root cause which doesnt creating relation between these.