This article shows how to add mandatory attributes at model design time in a Semarchy xDM model.
You can add Simple Attributes as mandatory directly on the entity.
It's also possible to add mandatory Complex Attributes, but they are managed in the complex attribute definition (please refer to Create a complex type and complex attributes).
Note: If you do not have a model and an application yet, refer to Create a data model, Create entities and attributes articles for more details. |
Add mandatory attributes
Open your model in the Application Builder and follow these steps:
- Expand the Diagrams node and double-click on your diagram
- Select the target Entity to add the mandatory attribute, right-click on it and select Add Simple Attribute
- In the Create New Simple Attribute dialog, enter the Name of your attribute. Refer to Naming Conventions for more details.
- Review / Edit / Correct the Label and Physical Column Name.
- Select a Type from the available types and optionally set the physical database column Length, Precision, and Scale when necessary.
- Check the Mandatory checkbox and select a value for Mandatory Validation Scope. Refer to Validation scopes for further details.
- Click on Finish, you can see your mandatory attribute in the entity view prefixed by an asterisk *