Links

Relationship

Know the component and how to use it.
Relationship creates relations between 1 or more entities so that searches in different bases can be made.
IMPORTANT: the component doesn't support concurrent accesses while trying to update or save new relations.
Take a look at the configuration parameters of the component:
  • Operation: operation to be executed (MATCH, CREATE, UPDATE, GET BY FIELD AND VALUE, TRANSLATE and DELETE EXACT).
  • Relation Name: name given to the created relation.
  • Translate Path: path through which the component searches the IDs to be translated.
  • From: origin of the search.
  • To: destination of the search.
  • Fail On Error: if the option is enabled, the execution of the pipeline with error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.

Operations

  • MATCH: searches a match between 2 fields and the declared value.
  • CREATE: creates a relation by the field.
  • UPDATE: update an existing relation by the field.
  • GET BY FIELD AND VALUE: searches a relation between the field and its value.
  • TRANSLATE: translates an IDs list based on the path specified in "Translate Path".
  • DELETE EXACT: delete an exact relation in all the declared fields.
IMPORTANT: it's necessary to declare the query inside the relation object:
{
relation : {
field1: value
field2: value
}
}