An entity represents a data table that holds information within the data model. In Wyn Enterprise, you can easily add an entity by either binding to an existing data table or creating a new data table through the SQL query. This article describes the steps to add an entity in a data model and its important properties. For more information, refer to the following sections.
To add a new entity, click the Add Entity button on top of the model editor.
In the Add Entity dialog box that appears, enter the name of the new entity.
If you are adding a new entity by binding, select the Table option from the Binding section, and then select a data table from the provided list as shown.
Or,
If you want to add a new entity through a SQL query, select the SQL Query option from the Binding section and enter the SQL statement to define the new entity.
Click the Validate button to verify the data binding or SQL query.
Finally, click the Add button to confirm.
A newly added entity will appear in the list of entities on the left. You can modify the properties of the new entity in the Properties panel that appears on the right.
In a Direct Query Model, entities added by SQL query can only be modified. To modify an entity, follow the below instructions,
On Data Model Designer page, hover on the entity under Entities pane and click the edit icon that appears on hover.
Modify Entity popup will appear on your screen. Modify the query in the input box, click the Validate button to verify the modified query and then, click the Modify button to finish.
Note: If an entity is modified from an SQL Expression to Table, the entity cannot be modified again.
The following table describes the important properties of an entity that you can set in the Data Model Designer.