Is there a way to get the MetaData
of the result returned by executing a nativeQuery
on an Entity Manager in JPA?
AFAIK there is no way of getting the result set metadata since there is no way really, of getting the result set. But, turn it around: what do you want the meta data for? Most of the information from the result set metadata you already have to have to be able to annotate your entity classes. The result set from conventional SQL/JDBC and the List you get from the EntityManager differs conceptually even if they can express the same semantics.