<分区>
hibernate 注释 @Index
已弃用,但我找不到文档或任何提示如何交换它。
@Entity
class MyEntity {
@Index(name = "name") //org.hibernate.annotations.Index
private String name;
@Index(name = "age")
private int age;
}
结果:
@deprecated 使用 {@link javax.persistence.Index} 代替。
但是,如果我更改导入:Annotation disallowed for this location
。
那么:当使用非弃用索引时,上述实体必须是什么样子?