RelationshipManager
| 📊 Overview: 3 Properties | 1 Constructor | 11 Functions |
📝 Description
Set up paths
🕐 Last updated: 2025-11-14T16:53:01.339Z
📑 Table of Contents
- 📋 Properties (3)
- 🏗️ Constructor
- ⚙️ Functions
- Regular Functions
- _loadRelationships
- discoverRelationships →
Integer - _discoverFormTableLinks
- _discoverTableClassLinks
- _discoverClassClassLinks
- addLink (6 params)
- removeLink (4 params)
- getRelationshipsFor (2 params) →
Collection - getReverseRelationshipsFor (2 params) →
Collection - save
- toJSON →
Text
- Regular Functions
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
_discoverFormTableLinks
Function _discoverFormTableLinks
Discover Form → Table links from form JSON files
_discoverTableClassLinks
Function _discoverTableClassLinks
Discover Table → Class links (DataClass, Entity, EntitySelection patterns)
_discoverClassClassLinks
Function _discoverClassClassLinks
Discover Class → Class links (extends relationships)
addLink
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 | - | - |
removeLink
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