Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
333 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...