I'm having a small problem mapping (JPA) columns to a class in my system. I have some procedures in the bank that do a lot already and I would not like to stop using them, but I do not know how to map.
SELECT r.*, ultimo_documento(r.id) as ultimo, ultima_acao(r.id) as ultima,
abcd(r.id, r.nome) as campo_teste
FROM requerimento
I have in my class the fields ' ultimo
, ultima
, campo_teste
' mapped with @Transient.
But these fields are not filled.
I use @NativeQueries
declared before the entity.
How to map a column that does not exist in the database?