entities~Relationship(relationshipType, startEntity, endEntity)

An instance of a relationship between two entities. The relationship defines a connection between an start node and an end node. The relationship is of a relationship type.

new Relationship(relationshipType, startEntity, endEntity)

Constructs a relationship.
Parameters:
Name Type Description
relationshipType RelationshipType The type of the relationship.
startEntity Entity The start entity.
endEntity Entity The end entity.

Methods

disconnect()

Disconnects the relationship from both ends.

getEndEntity() → {Entity}

Returns the end entity.
Returns:
Entity - The end entity.

getStartEntity() → {Entity}

Returns the start entity.
Returns:
Entity - The start entity.

getType() → {RelationshipType}

Returns the type of the relationship.
Returns:
RelationshipType - The relationship type.

getUuid() → {string}

Returns the UUID of the relationship.
Returns:
string - The uuid of the relationship.