Possible duplicate:
How to get ResultSetMetaData from enity manager?
Given a simple table ( example_table
) with the following columns: id, first_name, last_name
it possible, by executing your own JPA sql server em.createNativeQuery("select * from example_table")
, to get column names and also data? Running getResultList()
in the query returns data. How else can I get the column names?
source share