I get an internal exception: org.postgresql.util.PSQLException: Error value too long for varying character (255) when i try to insert using EclipseLink JPA a value for a description on a certain entity. I thought using the @LOB annotation and setting a max length on the column would take care of it as follows:

@Size(min = 0, max = 9000)
@Lob
@Column(name = "description", length = 2000)
private String description;

but this does not solve the problem, how can i specify that i want a non binding length for this column as it could be very large

有帮助吗?

解决方案

It turns out that i have to recreate all the tables for this effect to work @Lob declares the text type in postgresql.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top