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() {
return this.stacktrace;
}
Try this:
@Column(name = "STACKTRACE")
@Type(type="text")
我认为这解决了这个问题
@Column(length = 65535,columnDefinition="Text")
逆向工程Hibernate Tools,来自MySql Type文本:
@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")'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.