orientdb - Making a copy of record without edges -
is there way make copy of arbitrary orientdb record without edges? modified original command (from docs) copying records , added fetchplan it, not work (frankly speaking me looks there's problem parsing particular command, im wrong)
this 1 executes fine, edges remain:
insert test select test @rid=#102:119 fetchplan in_*:-2 out_*:-2
this 1 gives error:
insert test (select test @rid=#102:119 fetchplan in_*:-2 out_*:-2) com.orientechnologies.orient.core.command.ocommandexecutornotfoundexception: cannot find command executor command request: sql.(select test @rid = #102:119 fetchplan in_*:-2 out_*:-2)
also tried smth like
insert test content (select @this.tojson('fetchplan:in_*:-2 out_*:-2') test @rid=#102:119)
but doesn't work either. thoughts? i'm on orient 2.1.x
as workaround can use javascript function 1 parameter (id)
var g=orient.getgraph(); var b=g.command("sql","select @this.tojson('fetchplan:in_*:-2 out_*:-2') json "+ id); if(b.length>0){ var query="insert test content " + b[0].getproperty("json") ; var myvertex=g.command("sql",query); g.commit(); return myvertex; }
using following command
select expand(result) (select yourfunction(#102:119) result)
Comments
Post a Comment