Skip to content

Create Server Data Store

Key Lesson: In this step, you learn how to create a **Server Data Store** and configure which Entities are persisted to the application database.

Create a Server Data Store for the Purchasing app and add PurchaseRequest and PurchaseRequestItem from Build the Minimum Data Model.

  1. Go to Design.
  2. Select ServerDataStore under Object Types.
  3. Click +.
  4. Enter PurchaseDB and click OK.

When the editor opens, leave the following GENERAL settings at their default values:

SettingValue
STORE TYPEDataBase
USE SYSTEM DATABASEEnabled (default)
DATABASE SCHEMA NAMEsolution
CREATE DB TABLES FOR STATIC ENTITIESDisabled (default)

Under Entity configurations, use SELECT ENTITIES to select the two Purchase Request Entities:

EntitySelection
Purchasing.PurchaseRequestSelected
Purchasing.PurchaseRequestItemSelected

Note

After an Entity is selected, it appears under CONFIGURATION. Except for the currency precision setting in the next section, leave the Entity configuration settings at their default values for this tutorial.

Under CONFIGURATION, set Precision to 2 for the persisted budget amount:

Entity propertyPrecision
Purchasing.PurchaseRequestItem.budgetAmount2

Leave the remaining Entity configuration settings at their default values for this tutorial.

Save and close the editor.