我在Spring中遇到错误并使用db postgres
org.postgresql.util.PSQLException: ERROR: column "XXXXXXXXXX" is of type
character varying[] but expression is of type bytea
Hint: You will need to rewrite or cast the expression.
我的POJO有data_member,如:
@Column(name = "xxxxxxx")
private String[] xxxxxxx;
答案 0 :(得分:0)
您可以实现hibernate UserType 界面,
然后将@Type
注释添加到您的属性中。
示例:的
@Column(name = "xxxxxxx")
@Type(type = "xx.xxx.xxx.YourImplementationOfUserType")
private String[] xxxxxxx;