ORM Basics: Adding Indexes

Last Updated: 03/28/2018 Introduced in Version: 2.0

Adding Index to Field

Indexes can be declared on fields that have been marked to be stored by the ORM. An index name and a flag to say if index is unique can be added to this.

Below is an example of specifying an index on a field.

 

Adding Index to Table

If an index includes more than one field, it can be specified at the table level.

Below is an example of specifying an index on a table.

Additional Resources