ComUnity Platform
25.x
25.x
  • ComUnity Technical Overview
  • Getting Started
    • ComUnity Developer Toolkit
      • Login
      • Manage your account: Profile, Settings, and Actions
    • Manage your project
      • Create a project
      • Project Settings
      • General
      • Build and launch your project
      • Templates
      • App Users & Roles
      • Themes
      • Versions
      • Icon Management
      • Store URLs
      • Deploy
        • Environments
        • Manual Project Deployment Across Environments
        • Configuration
    • Organisations
      • Roles and Permissions
      • Organisational Management
      • Teams
  • Toolkit Guides
    • Data
      • Customising the Data Model
      • Manage Entities in the Data Model: Step-by-Step Guide
      • Setting Up Role-Based Permissions for Entities: Access Control Configuration
      • Creating Entity Associations: Configuring Table Links
      • Manage Inheritance in the Data Model: Configuring Entity Hierarchy and Inheritance
    • Screens
      • Integrated Navigation and UI Builder for Screens in the ComUnity Developer Toolkit
      • Building Screens
        • Screen Controls
        • Navigation
          • Lists in Navigation pages
            • Dynamic List Rendering in Navigation pages
            • Adding Sub-Screens to Navigation pages Using List Navigation
          • Page Link
        • Form
          • Screen Controls
          • Lists in Form pages
            • Static Item - List Item
            • Single Item - List Item
            • Entity Items - List Item
    • Custom Classes
    • Custom Website
      • Bindings
      • Pages
        • Page Development
        • Page Elements
        • Templates
        • Resources
    • Communications
      • Configuring Dynamic Action Templates for Event-Driven Communication Channels
        • Event Details: Understanding Data Sources for Dynamic Template Building
        • Email
        • SMS & WhatsApp
        • INAPP
        • Push Notifications
        • HTTP
      • Triggering the Communication Service
      • Communication Settings
    • Events and Notifications Management
    • Observability
      • Client Analytics
      • Metrics
      • Traces
    • Third Party Services
      • Azure Function Apps
      • Azure Logic Apps
      • Integrations
      • Microsoft Fabric
      • APIs
    • Services
      • Media Server
  • General Information
    • Debugging and editing your application code
  • Toolkit Tutorials
    • Build a Simple Blog App: The Beginner's Guide to ComUnity Development
    • Building a Comprehensive News App: Integrating In-App Messaging, Push Notifications, SMS, and Email
    • APIs
      • JSON Placeholder Todos API Integration in a Simple Blog App
      • Countries GraphQL API Integration Using the APIs feature in the Toolkit
      • Integrating the JSONPlaceholder Posts API Using the Toolkit’s OpenAPI Feature
      • OData Integration with the Bookings API Using the APIs feature
    • How to Configure In-App Notifications for User Profile Updates Using Communications
  • Enhancing Cases App: Real-time Comment Notifications
  • Reference articles
    • Glossary
    • Privacy by Design
    • OData
    • Razor
    • CRUD Functions
    • Mustache Templating
    • Temporal Tables
    • Integrating WhatsApp Business with the ComUnity Platform
    • Data Types
    • Field Types
    • Table Links
    • Release Notes
    • Keyboard Shortcuts
Powered by GitBook
On this page
Export as PDF
  1. Toolkit Guides
  2. Data

Creating Entity Associations: Configuring Table Links

In the ComUnity Developer Toolkit, you have the power to establish and configure various types of entity associations and relationships within your data model. This section focuses on creating entity associations using Table Links, a powerful feature that enables you to define connections between entities and add foreign key properties.

Whether you need to establish one-to-many, one-to-one, or other types of relationships, the Toolkit offers flexible options to meet your requirements. With Table Links, you can create robust associations between entities, ensuring data integrity and efficient data retrieval.

By leveraging Table Links, you can seamlessly integrate related entities and enable cascading actions, such as automatic updates or deletions. This enhances the consistency and efficiency of your data model, providing a solid foundation for building sophisticated applications.

In the upcoming section, we will explore the step-by-step process of creating entity associations using Table Links. You will learn how to establish relationships, define foreign key properties, and configure the desired behaviour of the associations.

To create Table Links and establish entity associations follow these steps:

  1. In your project settings in the Toolkit navigate to Data then select Diagram or List to view your Data Model.

  2. Locate the icon, this icon allows you to add a new Table Link.

  3. Click icon, and an Add a new table link modal window will appear on your screen.

  4. In the From Entity box, select the entity from which you want to start the link. In the To Entity box, select the entity to which you want to link. The order of selection does not matter, as table links have no direction.

  5. Finally, click on the Add table link button to create your table link.

Once you have created your table link, it will appear as a line connecting the entities in a Diagram view. In the expanded view of an entity, the table link will be displayed as a field with a icon. When you click on a table link, it will be selected and indicated by turning blue in the Diagram view or having a blue background in the List view, as shown in the images below. This visual indication helps you identify and interact with the table link easily.

Upon selecting a table link, a properties dialog will appear, providing you with a comprehensive set of options and settings to configure the behaviour and characteristics of the association. You can customise the table link properties according to your specific requirements.

For a detailed description and explanation of each table link property, please refer to the table below.

Table Link Properties

Association name
Function
Value selection

From Entity

Identifies the source entity

Select an Entity from the list of Tables in the dropdown.

From Relationship

Identifies the type of relationship

Select one of: Many | 0..1 (Zero or One) | 1 (On

From Entity Navigation Name

Each originating Table Link must be identified with a name.

Label the Table Link

To Entity

Identifies the target entity

Select an Entity from the list of Tables in the dropdown.

To Relationship

Identifies the type of relationship

Select one of: Many | 0..1 (Zero or One) | 1 (One)

To Entity Navigation Name

Each target Table Link must be identified with a name.

Label the Table Link

Add Foreign Key Property

It is recommended that you include properties in the model that map to foreign keys in the database. With foreign key properties included, you can create or change a relationship by modifying the foreign key value on a dependent object. Using foreign keys is even more essential when working with disconnected entities. Note: that when working with 1-to-1 or 1-to-0..1 relationships, there is no separate foreign key column, the primary key property acts as the foreign key and is always included in the model. For more information: Go to Entity framework relationships @

Select the checkbox to set a foreign key

For more information: Go to Entity framework relationships @

For more information: Go to Entity framework relationships @

https://docs.microsoft.com/en-us/ef/ef6/fundamentals/relationships
https://docs.microsoft.com/en-us/ef/ef6/fundamentals/relationships
https://docs.microsoft.com/en-us/ef/ef6/fundamentals/relationships