What is the correct mapping type from MySQL data type text
to Java using Hibernate?
@Column(name = "STACKTRACE", length = Integer.MAX_VALUE)
public String getStacktrace() {
retur开发者_运维百科n this.stacktrace;
}
Try this:
@Column(name = "STACKTRACE")
@Type(type="text")
I think this solves the problem
@Column(length = 65535,columnDefinition="Text")
The reverse engineering Hibernate Tools, makes from MySql Type text:
@Column(name = "COLUMNNAME", length = 65535)
To fix this issue, I had to annotate like below:
@Column(name="LONG_DESCRIPTION" , length = 65535, columnDefinition="TEXT")
@Type(type="text")'
精彩评论