This question is relevant if you are using the new version of orientdb 2.1. But as far as I know, these functions were implemented in version 2.2.
"As far as I can tell, updates work (including to / from):"
UPDATE FRIEND SET in=#11:5 WHERE in.name="Samantha" and out.name="Mat"
Although using the query inside the set clause for in / out will result in an array return:
UPDATE Friend SET in=(SELECT FROM User WHERE name="Jason") WHERE in.name="Samantha" and out.name="Mat"
Upsert also works, although when creating a new vertex, it does not set the in / out properties. You can set the I / O properties yourself, for example:
UPDATE Friend SET comment="Wazzzaup", in=
This will lead to a longer query when using the subquery for in = and out =, but at least it works (the subquery has the same problem as above).
I got this information from the release:
https://github.com/orientechnologies/orientdb/issues/1114#issuecomment-156585776
source
share