Skip to content
Advertisement

Hibernate error “operator does not exist: bigint = character varying”

I’m using hibernate to read my database datas but i’m having a issue with the relationship of the tables when i run a query. And i don’t find the reason That’s the error:

2021-01-23 18:16:55.427 WARN 1192 — [nio-8080-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 42883 2021-01-23 18:16:55.427 ERROR 1192 — [nio-8080-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: operator does not exist: bigint = character varying Dica: No operator matches the given name and argument types. You might need to add explicit type casts. Posição: 384

That’s the query:

JavaScript

And that’s how I call the query:

JavaScript

Entities:

JavaScript

sql script:

JavaScript

Advertisement

Answer

I got it, this error occurred cause EntidadeUsuario id is a Integer, not a String. So I changed that:

JavaScript

To that:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement