Skip to content

Deactivating ("ending") a relationship

In no situation do we ever physically delete a relationship entry in the database. If a relationship ends, we deactivate it. This allows us to maintain a history of the relationship over time.

Deactivating a relationship means updating the relationship properties:

  • Setting thruDate to a value <= today
  • Setting active to false
  • Setting the termReason to a value describing why the relationship ended

There are some situations where deactivating the relationship from a party to a node could leave the database in an invalid state. For example, let's say a client leaves the agency, and the party has only a :Client role attached. If all client role relationships are deactivated then that means the party is not a client. But this could leave the party “orphaned” with no role at all — which should be considered an invalid state. Therefore, the API should enforce a business rule that attaches a compensatory role to parties.

These situations and the associated rules for preventing inadvertently creating invalid states are described in the specific relationship rules sections below.

Confidential. For internal use only.