javahibernatejdbcmultiple-resultsets

Hibernate: Multiple Result Sets


from what I've read in the Hibernate documentation/online it sounds like Hibernate does not have the ability to handle multiple result sets. I'm looking to make a MySQL DB call in an application that relies on Hibernate, that will return multiple result sets.

What solutions have you used that "play well" with Hibernate, keeping in mind it's likely this will be the only call where multiple result sets will be returned?

Thanks!


Solution

  • AFAIK, you can't handle multiple result sets with hibernate. But I don't think you need it - multiple result sets can rarely map to results like List<FooEntity>. You can use plain JDBC for the queries that return multiple result sets and handle them manually.