Hi Giulia,
Thanks for the response.
This works. However, by the frequent db.commit() s I lose the atomicity of
the transaction, hence the ability to rollback. That's the only worry.
On Thursday, June 11, 2015 at 2:52:30 PM UTC+5:30, Giulia Brignoli wrote:
>
> Hi Omega,
>
> Try this function:
>
> db.begin();
>
> var bRid = db.command("INSERT INTO B(name) VALUES(\"Jack\") RETURN @rid");
> *db.commit();*
>
> db.command("INSERT INTO A(name) VALUES(\"Jack\")");
> *db.commit();*
>
> db.command("UPDATE A SET bLinkList =* [*"+ bRid+"*]*");
> *db.commit();*
>
> You need to add "[]" in the UPDATE command, and add commit() command for
> each query.
>
> Bye, Giulia
>
--
---
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.