Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring 错误:列";xxxxxxx";类型为character variable[],但表达式类型为bytea_Spring_Postgresql_Hibernate - Fatal编程技术网

Spring 错误:列";xxxxxxx";类型为character variable[],但表达式类型为bytea

Spring 错误:列";xxxxxxx";类型为character variable[],但表达式类型为bytea,spring,postgresql,hibernate,Spring,Postgresql,Hibernate,我在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. 我

我在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有如下数据:

@Column(name = "xxxxxxx")
private String[] xxxxxxx;

您可以实现hibernate用户类型接口, 然后将
@Type
注释添加到属性中

例如:


提供更多细节。如果方便的话,放一些代码,可能是
@Column(name = "xxxxxxx")
@Type(type = "xx.xxx.xxx.YourImplementationOfUserType")
private String[] xxxxxxx;