Answer the question
In order to leave comments, you need to log in
How to index a text field in Hibernate?
If we want to index a field (column) of a table using Hibernate, we write:
@Entity
@Table(name = "page", indexes = {@Index(columnList = "path", name = "path_indx")})
public class Page {
......
@Column(name = "path", columnDefinition = "TEXT", nullable = false)
@Type( type = "org.hibernate.type.TextType")
@NotNull
String path; код
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question