Getting column names from a JPA Native Query

前端 未结 7 1122
孤街浪徒
孤街浪徒 2021-01-02 00:33

I have an administrative console in my web application that allows an admin to perform a custom SQL SELECT query on our database.

Underneath, the application is usin

7条回答
  •  悲哀的现实
    2021-01-02 01:33

    I also faced a similar problem working with JPA. There is no direct way in JPA to access the resultset metadata. The solution can be extracting column names from the query itself or use JDBC to get the metadata.

提交回复
热议问题