In mongodb, for example, the following mapping:
{code} @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name = "type") public abstract class BigEvent implements Serializable { } {code}
should create the following index (or something similar): {code} > db.BigEvent.getIndexes() [ ... { "v" : 1, "key" : { "type" : 1 }, "name" : "type_idx", "ns" : "ogm_test_database.BigEvent" } ] {code}
This should also happen with the deafult column (DTYPE column). We should skip this step if a user has defined an index for the that column. |
|