3
I have a small problem when mapping (JPA) the columns of a class of my system. I have some procedures in bank that do a lot of things already and 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 in.
Utilise @NativeQueries
declared before the entity.
How to map a column that does not exist in the database?
What do you mean, friend? Do you need to have this information persisted in the bank? If you already have
@Transient
, I see no problems with implementation unless the compiler accuses something.– Gustavo Cinque