Hi outsystems comunityHow can i make the first attribute of my database contain a primary key (just can have a single value ) and increment automatically in the next add of a new line, and thank you in advance.
Hello Yahyaoui Takwa,
In OutSystems, a primary key is called Entity Identifier. As stated in the documentation, when an Entity is created, an attribute called Id is automatically added as an Entity Identifier. By default, it is of data type Long Integer, and its value is automatically calculated in sequence (an AutoNumber in OutSystems). This way, you don't have to implement any specific logic to uniquely identify each entity record.
In OutSystems, it is not possible to have composite keys because only one attribute can be the Entity Identifier. But you can use indexes to create alternate keys. When creating an index there is always a relevant trade-off between fetching and inserting data as it may bring some overhead to the latter.
I hope now this is clear to you. Best regards,
Ana