Hi, I have searched in the forums and I haven't found anything...
The need is to execute a user defined query (so I don't know anything about it) and read the column names.
I didn't find how to get de column name of a List<> and I didn't find how to parse the CreativeNativeQuery.getResultList to a ResultSet (when I trid I get: java.util.Vector cannot be cast to java.sql.ResultSet).
The only solution would be read them from the query, but it won't work with "*" parameter.
getResultList() returns a List of results, for a native query this will most likely be an List of Object, where the Object contains each piece of data you selected.
If you native query used a resultClass, then it can return a object.
You cannot get a JDBCResultSet using JPA, if you want a JDBC ResultSet, then just use JDBC.
There is no way to get the column names, only the data is returned, you are assumed to know what you selected.
If you are using EclipseLink you can set a hint of the native query to return a List of Map instead of List of Object so you get the column names.