RelationshipManager GitHub

📊 Overview: 3 Properties 1 Constructor 11 Functions

📝 Description

Set up paths

🕐 Last updated: 2025-11-14T16:53:01.339Z


📑 Table of Contents


Properties

Property Type Default Description
RelationshipsFile Text - -
Relationships Collection - -
Changes Collection - -

Constructor

constructor

[🏗️ constructor]

Class constructor

Functions

Regular Functions

_loadRelationships

Function _loadRelationships

Load existing relationships from JSON file


discoverRelationships

Function discoverRelationships -> Integer

Auto-discover relationships from existing JSON files

Returns: Integer


Function _discoverFormTableLinks

Discover Form → Table links from form JSON files


Function _discoverTableClassLinks

Discover Table → Class links (DataClass, Entity, EntitySelection patterns)


Function _discoverClassClassLinks

Discover Class → Class links (extends relationships)


Function addLink($FromName : Text; $FromType : Text; $ToName : Text; $ToType : Text; $FromDesc : Text; $ToDesc : Text)

Check if relationship already exists

Parameters:

Name Type Optional Description
$FromName Text - -
$FromType Text - -
$ToName Text - -
$ToType Text - -
$FromDesc Text - -
$ToDesc Text - -

Function removeLink($FromName : Text; $FromType : Text; $ToName : Text; $ToType : Text)

Remove a link between entities

Parameters:

Name Type Optional Description
$FromName Text - -
$FromType Text - -
$ToName Text - -
$ToType Text - -

getRelationshipsFor

Function getRelationshipsFor($EntityName : Text; $EntityType : Text) -> Collection

Get relationships for a specific entity (where entity is FROM)

Parameters:

Name Type Optional Description
$EntityName Text - -
$EntityType Text - -

Returns: Collection


getReverseRelationshipsFor

Function getReverseRelationshipsFor($EntityName : Text; $EntityType : Text) -> Collection

Get reverse relationships (where entity is TO)

Parameters:

Name Type Optional Description
$EntityName Text - -
$EntityType Text - -

Returns: Collection


save

Function save

Save relationships to JSON file


toJSON

Function toJSON -> Text

Convert to JSON string

Returns: Text



Generated from RelationshipManager.4dm