We're updating the issue view to help you get more done. 

When a mapping requires a discriminator column an index should be created for that column

Description

In mongodb, for example, the following mapping:

1 2 3 4 5 @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name = "type") public abstract class BigEvent implements Serializable { }

should create the following index (or something similar):

1 2 3 4 5 6 7 8 9 10 11 12 > db.BigEvent.getIndexes() [ ... { "v" : 1, "key" : { "type" : 1 }, "name" : "type_idx", "ns" : "ogm_test_database.BigEvent" } ]

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.

Environment

None

Status

Assignee

Unassigned

Reporter

Davide D'Alto

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Major