Hi there!
I was trying to do a simple update using JPA on Wildfly 10 server:
Code:
Query q = this.em.createNativeQuery("update adm_texto set tip_texto = :tipTexto");
q.setParameter("tipTexto", null);
q.executeUpdate();
But I get this error:
Caused by: org.postgresql.util.PSQLException: ERROR: column "tip_texto" is of type numeric but expression is of type bytea
Dica: You will need to rewrite or cast the expression.
I already tryed to upgrade (5.1) and downgrade (4.3) the hibernate version but the problem remains. I also tryied to use a diferent database (oracle instead postgre) and the problem still happen.
The table is very simple:
CREATE TABLE adm_texto
(
seq_texto numeric(20,0) NOT NULL,
des_texto character varying(50) NOT NULL,
txt_texto text,
tip_texto numeric(2,0)
)
Any ideas why this happen and how to solve?
Thanks!