Hi,
When using table-per-hierarchy inheritance, GORM creates a 'class' column that stores the classname of instances.
I want to add DB index to this column, since many of my SQL queries include where class='com.myapp.Mychildclass'
. However, I didn't succeed with this code:
static mapping = {
columns {
'class' column: 'class', index: 'class_idx'
}
}
I tried different versions of this code without having the index created.
How can I do that?