0

My question is similar to some others, but I haven't found a solution. Closest would be Can we UPSERT an EDGE in orientdb?

I'd like to use REST scripts against dynamic C# objects to do this:

LET rec = upsert non-edge record properties
foreach edge on object, upsert edge using $rec

The question I linked has an upsert edge query which creates an orphaned edge, even if both out and in values are inserted correctly.

Since I know the parent and the $rec var works, my backup plan is to query for the edge, then do (the /n is needed for conditionals)

IF ($edge_exists.size() == 0) { \n LET newEdge = CREATE EDGE...

But does anyone know a smoother way to achieve this? Thanks!

Community
  • 1
  • 1
Devin D
  • 98
  • 11

0 Answers0