Logo

    Home

    Documentation

    Use Cases

    Training

    Applications

    Release Notes

    Create an Entity and DSO without a DB/Table

    Create an Entity and DSO without a DB/Table

    • Description
    • Short description
    • How to use it

    Description

    In B1, it is possible to create data sources and entities based on a Backend Data Source Object (DSO). This implies that there is no need for a physical database with a table in the background. To achieve this, create a Backend DSO and a temporary table. Based on these, an entity is generated. Subsequently, a Data Source Object (DSO) can be created based on the generated entity.

    Short description

    Create a backend class and a temp table definition → Generate based on the backend class the entity → Generate based on the backend class the DSO→ Generate any object based on the Entity

    How to use it

    1. Create a new BackendDSO in src/backend/BackendDSO
    2. Create a new file for your backendDSO like “MyDataSource.cls” and a tempTableDefintion like “dsData.i”
    ‣
    You can use the following example code → MyDataSource.cls
    ‣
    You can use the following example code → dsData.i
    1. Now go to B1 and create an entity based on the MyDataSource.cls
    2. Navigate to Integrate → Data → Datasoruce and click on “Generate Entity & Datafields”
      1. Name: Name of your Entity. For naming convention please add an “Entity” in the end
      2. Description: Add a short description
      3. Module: Add a corresponding module
      4. Definition Source Type: Select the BusinessEntity
      5. Business Entity: Add the name of your backend DSO
      6. ‣
        Example picture
    3. Create a DataSourceDataSource
    4. Navigate to Integrate → Data → Datasoruce and click on “Generate Datasource”
      1. Name: Name of your DSO. For naming convention please add an “DSO” in the end
      2. Description: Add a short description
      3. Module: Add a corresponding module
      4. Select the BusinessEntity
      5. Business Entity: Add the name of your backend DSO
      6. Business Entity Table: Add the name of your tempTableDefinition → Here “eTable”
      7. ‣
        Example Picture
    5. Now you can create objects based on your DSO
    6. Here an example for an Grid / TableGrid / Table
    7. Navigate to Design → Components → Grids → and click on the button “Generate”
      1. Name: Name of the grid
      2. Titel: The title of your grid
      3. Description: Add a short description
      4. Entity: Select your created entity
      5. Fields: Select your fields. If you want to use all than add an “*”
      6. Module: Select the corresponding module
      7. ‣
        Example picture

        Result for the grid

        image

    Back to DocumentationDocumentation

    Back to Home Page

    Logo