Getting column names from a JPA Native Query

前端 未结 7 1124
孤街浪徒
孤街浪徒 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-02 01:30

    If the JPA provider does not support the retrieval of query metadata, another solution could be the use of a SQL parser like JSQLParser, ZQL or General SQL Parser (comercial), which extracts the fields from the SELECT statement.

提交回复
热议问题