Reputation: 356
i migrated from hibernate 4.2.x to 4.3.x and now the @Index annotation is deprecated. I used to use
@Basic
@Column(length = 2000)
@Index(name = "siteOrigin_idx")
private String siteOrigin;
to index the strings. I simply don't get how to enable indexing in hibernate 4.3+.
Upvotes: 2
Views: 2868
Reputation: 242696
Since Hibernate 4.3 implements JPA 2.1, you're supposed to use @Index
annotation from JPA 2.1 now.
Upvotes: 4