The hibernate annotation @Index
is deprecated, but I can't find docs or any hints how to exchange it.
@Entity
class MyEntity {
@Index(name = "name") //org.hibernate.annotations.Index
private String name;
@Index(name = "age")
private int age;
}
Result:
@deprecated Using {@link javax.persistence.Index} instead.
But if I change the import: Annotation disallowed for this location
.
So: how does the above entity have to look like when using non-deprecated index?