Skip to main content

Select Equality Attributes (DB Entity)

Selectl Equality Attributes​

When comparing entities within an application, ensuring accuracy and consistency is crucial. The Select Equality Attributes feature allows users to specify which attributes should be used when determining if two entities are identical. An Equals method is automatically generated based on these selected attributes.

Steps to Select Equality Attributes:

  1. Open the DB Entities

    • In the Explorer menu, right-click the created DB Entity.
    • Select Select Equality Attributes.
  2. Choose Attributes for Comparison

    • In the Properties Panel, select the attributes from the list that should be used to check for equality between entities.
    • These attributes will define how the system determines if two entities are considered equal.
  3. Save the Selection

    • Confirm the selection.
    • Upon successful application, the system displays: "DB Entity saved successfully".

Use Case Example​

Consider an Employee entity with attributes:

  • Id (Primary Key)
  • FirstName
  • LastName
  • Email

If Email is selected as an equality attribute, two employee records with the same email will be considered equal, regardless of other differences.

Select System Attributes​

System Attributes are predefined attributes that automatically track creation and modification details of an entity. These attributes help maintain audit trails and data integrity.

Available System Attributes​

AttributeDescription
CreatedByStores the user who created the record.
CreatedOnStores the timestamp when the record was created.
LastUpdatedByStores the user who last modified the record.
LastUpdatedOnStores the timestamp when the record was last updated.

Select Equality Attributes