My problem is that I want to have text datatype for a column in db, but I cannot manage to instruct Hibernate (using JdbcTypeCode for example) to recognize text column as having the correct length.
Right now if I use @JdbcTypeCode(SqlTypes.LONGVARCHAR) it tells me to use the type varchar(32600).
I also tried to use LONG32VARCHAR which I suspect is meant to answer that need, but the jdbc postgresql driver will fail then with this kind of error when those fields are set to null:
Caused by: org.postgresql.util.PSQLException: Unknown Types value.
at org.postgresql.jdbc.PgPreparedStatement.setNull(PgPreparedStatement.java:297)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.setNull(HikariProxyPreparedStatement.java)
at io.opentelemetry.instrumentation.jdbc.internal.OpenTelemetryPreparedStatement.setNull(OpenTelemetryPreparedStatement.java:80)
at org.hibernate.type.descriptor.jdbc.BasicBinder.doBindNull(BasicBinder.java:98)
at org.hibernate.type.descriptor.jdbc.BasicBinder.bind(BasicBinder.java:51)
at org.hibernate.engine.jdbc.mutation.internal.JdbcValueBindingsImpl.lambda$beforeStatement$0(JdbcValueBindingsImpl.java:87)
Please try to create a reproducer with our test case template and if you are able to reproduce the issue, create a bug ticket in our issue tracker and attach that reproducer.