Any problems in using hibernate's session.connection() to run native sql
Since Hibernate session provides APIs to run native SQL queries, I would avoid extracting the connection from the session and leave the life cycle management of the Statement, ResultSet used for running native queries, to Hibernate Session itself. There must be some reason why they discourage the use of connection like this, directly and so it is being deprecated.