The required property, @openapi.openedge.entity.required, specifies the mandatory fields of an entity. It indicates whether a field can have a null value (unknown value in ABL or undefined in JSON).
In ABL, there is no temp-table support to specify whether or not a field is mandatory. So, the annotations for required fields are obtained from the database table definition when you generate a Business Entity class file from an express Data Object project or from a database table in the New Business Entity wizard.
Sample required annotation:
@openapi.openedge.entity.required (fields="HealthCare,MedicalSpending"). DEFINE TEMP-TABLE ttBenefits BEFORE-TABLE bttBenefits FIELD HealthCare AS CHARACTER LABEL "Health Care" FIELD MedicalSpending AS INTEGER INITIAL "0" LABEL "Medical Spending" FIELD StockPurchase AS INTEGER INITIAL "0" LABEL "Stock Purchase" FIELD XTZDEPENDENTCARE AS INTEGER INITIAL "0" LABEL "Dependent Care" INDEX EmpNo IS PRIMARY UNIQUE EmpNum DESCENDING |