Question

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

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top