给定表中的两个字段,我可以创建一个包含这两个字段的索引,如下所示:
@org.hibernate.annotations.Index(name = "IDX_REPORTID_RECNO")
private Integer reportId;
@org.hibernate.annotations.Index(name = "IDX_REPORTID_RECNO")
private Integer recNo;
我可以单独在每一列上创建索引
@org.hibernate.annotations.Index(name = "IDX_REPORTID")
private Integer reportId;
@org.hibernate.annotations.Index(name = "IDX_RECNO")
private Integer recNo;
但是它不允许我两者都做,这似乎是不允许的
@org.hibernate.annotations.Index(name = "IDX_REPORTID_RECNO")
@org.hibernate.annotations.Index(name = "IDX_REPORTID")
private Integer reportId;
@org.hibernate.annotations.Index(name = "IDX_REPORTID_RECNO")
@org.hibernate.annotations.Index(name = "IDX_RECNO")
private Integer recNo;
我怎样才能做到这一点 ?