OrientDB: UPDATE of adjacent vertex -


background

i have model represented graph in orientdb. model consists of few classes, among others a , b. classes connected relation has edge a b. edge connects a other classes:

a ---has--> b ---has--> c 

problem

i want update property of b if has has edge a given recordid.

my solution

currently selecting target/out vertex of edges has of class b starting @ given recordid. works feels missing easier solution this.

update (select expand(out('has')[@class = 'b']) #11:1) set prop = true

i tried following, did not work expected:

update b set prop = true in('has').@rid = #11:1

my question

is there simpler solution update subselect?

i don't think there premade sql function kind of filtering in update.

your first query way go because traverses instead of filtering on vertices. yes, have subquery faster using in update statement.

it cool have syntax :

update #9:1.inv('edgeclassname')[@class='classname'] set prop = true 

we have use subquery work. feels natural me.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -