Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get ResultSetMetaData from Entity Manager?

Is there a way to get the MetaData of the result returned by executing a nativeQuery on an Entity Manager in JPA?

like image 817
Muhammad Hewedy Avatar asked Mar 03 '11 11:03

Muhammad Hewedy


1 Answers

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.

like image 124
Erik Avatar answered Oct 22 '22 06:10

Erik