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, click the App Settings icon and then select Application Settings option.

Invoke Application Settings

Click the App Model option.

Click App Model option

Click the Object Relation Tab.

Click the Object Relation Tab
Here, you’ll see a neatly laid-out summary of all the relations you’ve pieced together so far.
Object relations page
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 + New Relation button located at the top of the page. This action opens the Create Object Relation Form.

Click New Relation option

This action opens the Create Object Relation Form.

Here’s how it flows:

Object Selection

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

Select Objects to link

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.
Select desired cardinality

Name Your Relation

While the system does suggest a name combining your two objects, feel free to craft one that best describes your relation.
Name the 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.

When we link objects, a property from one object can show up in the other linked object—that’s called the Reference Property. This feature works only with One-to-Many (1:N) relationships. Even then, you can choose whether to include or exclude it.

Include reference property?

If you include it, you’ll need to pick which property to use from the available options.

Select reference property

Finalize

Click the Create button to seal the deal.

Complete object linking process

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 the Alice AI button to receive AI-driven suggestions for Object Relations tailored to the structure of your application.

Click Alice AI button

Choose Object Relations

Alice AI will display a list of recommended Object Relations.
AI suggested relations
Select those that fit the needs of your application.
Select desired relations
If linking a specific property is necessary, make sure to tick the corresponding checkbox and choose the appropriate property for reference.
Reference Property
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.
Create relations

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.
Update App

You need to confirm your action, to complete the process.

Confirm Updation
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.