HQL到SQL转换器 [英] HQL to SQL converter

查看:682
本文介绍了HQL到SQL转换器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何将NHibernate HQL转换为SQL脚本吗?

Does anyone know how to convert NHibernate HQL to SQL Scripts?

推荐答案

由于HQL转换取决于您的映射以及运行时行为,因此我认为不可能有一种静态方法.

Since HQL translation depends on your mappings and also runtime behaviour, I think it is unlikely there is a way to do so statically.

您可以针对实际数据库运行HQL,并通过针对特定rdbms或NHProf的分析器捕获生成的SQL.

You could run the HQL against a real database and capture the generated SQL either via a profiler for your specific rdbms or NHProf.

这篇关于HQL到SQL转换器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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