How to Add an Index to a Database Table

Create a struct class whose fields are a subset of the fields of the entity class.

Add a relationship of stereotype index between the entity class and the struct. The direction of the relationship is not important.

Set the relationship name to the name which you want given to the database index.