Creating New Entity

Introduction

The vDesigner application provides you the Entity and Relationship feature that contains two different sub-modules: Entity and Relationship. The entity module allows you to create entity. The relationship module allows to establish the relationship between two entities.

While establishing relationship between two entities, you make one entity as a parent entity and therefore can define another entity as child entity of the parent entity. That is how you can define multiple child entities under single parent entity.

The vDesigner application provides POD as a default entity/object. Apart from POD, you can create a new entity and use it later. You can create a new entity as a parent entity or a child entity. Under POD, you can also create a child entity. The main objective of creating an entity is to store the entire data of mobile app in the JSON format.

The concept of creating and using an entity can be better interpreted by observing the following screen capture:

In the screen capture, the POD object stores the data of mobile app in the JSON format. In the JSON code, the POD_ID variable stores the unique ID that can be used to manage the data of mobile app in the JSON format. You can create an entity as follows.

To create an entity:

  1. On the vDesigner dashboard, locate the left navigation pane.
  2. In the left navigation pane, click Modules, the navigation pane expands.
  1.  Under Modules, click Entity & Relationship, and the Entity & Relationship dialog box opens.
  1. In the Entity & Relationship dialog box, enter the values to create an entity as follows:
BoxDescription
Entity NameIn this box, enter the name of entity (For example: – DUMMY).
Primary AttributeIn this box, enter the value as follows: $.POD.DUMMY[].ID  

In this hardcoded value, DUMMY[] is the array type object that stores the value of the ID variable. The POD entity is used to store the data in the JSON object.
PK ID Group NameIn this box, you can perform function with any of two options:

i. Option1:- (If you want to configure the ID generator for the new entity)
In this box, enter the name of entity: Dummy and then define the ID generator rule as described in the heading section: Configuring ID Generator Rule.    

ii. Option2:- (If you do not want to configure the ID generator for the new entity)
In this box, only enter the name of entity: Dummy that you are creating. In this case, a new ID will not be created.
  1. After you enter the value in the respective boxes, click Create Entity, and the entity is successfully created.

Was this article helpful?
YesNo