I have an entity (FitableEntity
) with an enumerated collection and I'd like to set an index on the enumeration string. This has no effect (no error, no index):
@Enumerated(EnumType.STRING)
@ElementCollection
@Updateable
@Index(table="fitableentity_state", columnNames={"state"})
private Set<FitableEntityState> state = numSet.of(FitableEntityState.Inactive);
I don't get an index
on state in the table fitableentity_state
as I'd expect.
Is there a way to do this via annotation or is a migration the only choice?
Thanks.