Did you declare you function as idempotent? Best Regards,
Luca Garulli CEO at Orient Technologies LTD the Company behind OrientDB <http://orientdb.com> On 24 June 2015 at 01:24, Roger Gajraj <[email protected]> wrote: > I am not the first to have this problem. see: > https://github.com/codemix/oriento/issues/185 > > It seems like and Orientdb problem? > > On Tuesday, 23 June 2015 19:16:02 UTC-4, Roger Gajraj wrote: >> >> *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? >> > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
