休眠:多个结果集 [英] Hibernate: Multiple Result Sets

查看:95
本文介绍了休眠:多个结果集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从我在Hibernate文档/在线阅读的内容看来,Hibernate没有能力处理多个结果集。我希望在依赖Hibernate的应用程序中进行MySQL数据库调用,它将返回多个结果集。



您使用哪种解决方案可以发挥出色与Hibernate,请记住这可能是唯一的调用多个结果集将被返回?



谢谢!

解决方案

AFAIK,你不能用hibernate处理多个结果集。但我不认为你需要它 - 多个结果集很少映射到结果,如 List< FooEntity> 。您可以将普通JDBC用于返回多个结果集并手动处理它们的查询。


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!

解决方案

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.

这篇关于休眠:多个结果集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆