Using orientjs (or a JS or SQL function), I'm trying to insert a related 
group of documents (up to six or eight at a time), so that LINKMAPs in each 
document can be set as they are inserted (i.e. D1->D2->D3->D4). I'm not 
wanting to use edges, because the links are only ever uni-directional and I 
gain nothing but additional overhead by having bi-directional "links".

Of course, I can do this "sequentially", insert D4, then insert D3 (now 
knowing the RID for D4), etc. But I'm looking for a more efficient way. The 
missing piece of the puzzle is that I don't think I have any way to know 
what the RID is (or will be) ahead of time. If I have to use the sequential 
method, then my thought would be to do this in a JS or SQL function (to 
save the communications round-trip latency of doing it in orientjs), but I 
can't figure out how to capture the RID of each document as it's inserted 
in a function.

Another idea, which I don't think is much better, would be to insert all of 
the documents without LINKMAPs and then update them afterward, but that 
seems even less efficient than the sequential approach.

Any insight would be much appreciated.

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to