Skip to content

Virtual Entity

circles-arrows edited this page Sep 1, 2018 · 5 revisions

Creating Entities

Virtual Entity

  1. Insert a new entity and name it as “BaseEntity” and add a “Uid” property as a string type, set index as unique and check the IsKey field.

Insert New Entity

  1. Set the “BaseEntity” as a Virtual entity type.

Set Virtual Entity

As you've noticed, the Abstract entity has automatically checked. It is because the Virtual entity type is also an Abstract entity type.

  1. Set the base entity for “Person”, “Title”, “Greeting” and "SocialMedia". Go to properties pane, select the "BaseEntity" for their base entity.

Set Base Entity

You can now see in the properties pane that the "Person", "Greeting", "Title" and "SocialMedia" entities inherit the properties from "BaseEntity".

Inherited Properties

But there's a problem: the entities that inherit the "BaseEntity" now contain two "Uid" properties.

Duplicate Properties

To resolve this, we need to delete the property "Uid" from "Person", "Greeting", "Title" and "SocialMedia" entities.

  1. Select the Person entity and in the properties pane, select the row for property "Uid" and press Delete key on your keyboard.

Set Base Entity

You can continue deleting the "Uid" property for the “Title”, “Greeting” and "SocialMedia" entities.

You have successfully created a Virtual entity type and have used it as a base entity.

Let's take a look at how to create relationships between entities.