Reputation: 149
I am getting Error in Spring and using 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.
My POJO have data_member like:
@Column(name = "xxxxxxx")
private String[] xxxxxxx;
Upvotes: 2
Views: 9012
Reputation: 61
You can implement hibernate UserType interface,
and then add @Type
annotation to your attribute.
Example:
@Column(name = "xxxxxxx")
@Type(type = "xx.xxx.xxx.YourImplementationOfUserType")
private String[] xxxxxxx;
Upvotes: 1