What _targetVertexFields_ parameter of edge transformer in Orientdb do?

55 Views Asked by At

The documentation says Defines the field on which to set the target vertex. but what it means it is not clear for me as there is already the joinFieldName and lookup combination to select the target vertex.

1

There are 1 best solutions below

0
On
  • joinFieldName defines the field containing the join value, the type is a String and is mandatory.
  • lookup defines the index on which to execute the lookup or a SELECT, the type is a String and is mandatory.
  • targetVertexFields defines the field on which to set the target vertex, the type is Object and is not mandatory.

The example below creates an edge from the current vertex, with the class set to Parent, to all vertices returned by the lookup on the D.inode index with the value contained in the filed inode_parent of the input's vertex:

{ "edge": 
  { "class": "Parent", 
    "joinFieldName": "inode_parent",
    "lookup":"D.inode",    
    "unresolvedLinkAction": "CREATE"
  } 
}

Hope it helps

Regards