Skip to content
Home » How to Set Up Object Relations

How to Set Up Object Relations

How to Set Up Object Relations

Objects play a crucial role, as they are the building blocks of an Application. Every object has distinct properties, functions, and identities, setting it apart. Establishing relationships between objects is crucial to defining how they interact. This is especially important for complex Applications, enhancing efficiency and effectiveness.
With CodelessONE, establishing object relations is straightforward. Let’s guide you through the process:
To reach the Object Relations page, head to the ‘Settings’ in the upper right corner, select ‘Application Settings’, and choose the ‘App Model’ option. This opens the App schema, showcasing Objects with their properties, Object Relations, Roles, and Portals. From here, proceed by selecting ‘Object Relation‘.
Here, you’ll see a neatly laid-out summary of all the relations you’ve pieced together so far.
There are two methods for creating object relations: Manually or with the assistance of Alice AI.

Method 1: Manual Creation:

To initiate the creation of a new object relation, click the “Add New Relation” button located at the top of the page. This action opens the Create Object Relation Form.
Here’s how it flows:

Object Selection

First, pick out the two objects you’re keen on linking.

Determine Cardinality

Cardinality is the essence of your relation. Cardinality defines the quantitative relationship between objects, offering three types:
One-to-One (1:1): Each object is associated exclusively with one other object.
One-to-Many (1:N): A single object can associate with multiple other objects.
Many-to-Many (N:M): Numerous objects can interrelate with many other objects.

Name Your Relation

While the system does suggest a name combining your two objects, feel free to craft one that best describes your relation.
In Codeless ONE, each data item you store and manage is called a Property, and similar properties are grouped into Objects. This method is like an Excel spreadsheet, where objects are individual sheets, and properties are columns with records as rows.

Finalize

Click “Create” to seal the deal.
Tip: If you’re in a flow and want to establish more relations, hit “Create and New” and continue your creation spree.

Method 2: Utilizing Alice AI for Object Relations

Initiate Alice AI

Click on the “Alice AI” button to receive AI-driven suggestions for Object Relations tailored to the structure of your application.

Choose Object Relations

Alice AI will display a list of recommended Object Relations.
Select those that fit the needs of your application.
If linking a specific property is necessary, make sure to tick the corresponding checkbox and choose the appropriate property for reference.
Note: The option to link a property in this manner is available exclusively when the cardinality type is One-to-Many (1:N).

Adding Relations

After selecting the necessary Object Relations, click on the “Add” button to incorporate these relations into your application, thereby enhancing its data structure.

Update Your App

It’s important to remember that any additions or changes you make will not be effective until you update your application by clicking the “Update App” button. This step is crucial to ensure that your configurations are applied.
Creating object relations in Codeless ONE is made straightforward, whether you prefer manually setting them up or using the AI-driven recommendations provided by Alice AI. This process streamlines the enhancement of your app’s relational architecture.