to obtain the data, I have no problem, I can read and manage them, for this I used:
select * from MiTabla;
And to read it:
em = emf.createEntityManager();
Query query = em.createNativeQuery("select * from MiTabla");
List<Object[]> listaDatos = query.getResultList();
Now, what I need is to get the names of the fields in that query, the complicated thing is that the structure of the query is not linked with JPA, that is, the result is not a structure of a linked table.
Therefore, I do not know if it is possible to obtain the metadata from a query, that is, as well as obtain the data itself, to be able to obtain the metadata. If someone knows something about the subject, well, great.
Before I finish, I use EclipseLink and I found this answer, but I do not know how to apply it.
In advance, thank you very much.