No updates to orientdb-community-2.0.10 database are made when function is called from Oriento within nodejs.
I have created a function,
myFunction, within studio and it works by adding items to a linklist field called ponections belonging to a vertex of class "Post" having @rid=#13:53 :
...
return db.command("sql", "update #13:53 ADD ponections = [#13:57, #13:53] ");
The function works completely, by adding the data to the "ponections" field, whenever I call it from within studio returning:
{
"result": [
{
"@type": "d",
"@version": 0,
"value": 1
}
],
"notification": "Query executed in 0.075 sec. Returned 1 record(s)"
}
However, when I call it from oriento using nodejs like so:
db.select('myFunction()').all()
.then(function (r) {
console.log('response: ', r);
});
.. it returns the same values as when called from studio:
[ { '@type': 'd', myFunction: 1, '@rid': { cluster: -2, position: 1 } } ]
BUT NO UPDATES TO THE ponections field of record #13:53 are actually made.
How can I fix this?