Java Developer

Grails - How to Create Custom Table Index or Composite Index in Grails

Domain classes in Grails have default index on Primary Key and Foreign Key, as they are usually used to join tables. But only these are created by default. If you wish to create a custom index given a field and index name, the syntax is simple. Here is an example: