Hi, i'm trying to create an index on two colums on a very simple annotated class:
@Entity @Table(appliesTo="Extension_static_table", indexes = { @Index(name="filename_comment", columnNames={"commented", "filename"} ) } ) public class Extension_static_table { private long id; private long cat_metric; private long var_metric; private int commented; private String filename; private String category; private String var_name; private String var_val; @Id @GeneratedValue public long getId() {return id;} public void setId(long id) {this.id = id;} public long getCat_metric() {return cat_metric;} public void setCat_metric(long catMetric) {cat_metric = catMetric;} public long getVar_metric() {return var_metric;} public void setVar_metric(long varMetric) {var_metric = varMetric;} public int getCommented() {return commented;} public void setCommented(int commented) {this.commented = commented;} public String getFilename() {return filename;} public void setFilename(String filename) {this.filename = filename;} public String getCategory() {return category;} public void setCategory(String category) {this.category = category;} public String getVar_name() {return var_name;} public void setVar_name(String varName) {var_name = varName;} public String getVar_val() {return var_val;} public void setVar_val(String varVal) {var_val = varVal;}
}
what am i doing bad (only primary key is created) Thanks
|