Issue
hibernate get underlying sql resutlset. nativequery is very limiting. i need to execute a regular sql query while being able to access the resultset.
org.hibernate.internal.ScrollableResultsImpl
has protected access on getResultSet
. how can i provide my own implementation that will expose resultset
.
I need a resultset to be able to get the metadata such as column names. they are there.
Solution
You can operate on the underlying Connection
directly, without resorting to a native query:
session.doWork(new Work() {
@Override
public void execute(Connection connection) throws SQLException {
}
});
Answered By - Guillaume