差异:用方言和方言休眠 [英] Difference : hibernate with dialect and without dialect

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

问题描述

我在Oracle数据库中使用hibernate,并且有一种方言配置,我知道方言用于生成原生sql。但是我用方言和方言检查了屏幕上生成查询的输出,两者似乎都一样,那么方言有什么用?有人可以给我们一个代码示例,我们可以纠正这种情况吗? 解决方案

您使用的是什么版本的hibernate?从3.2版开始,hibernate可以自动确定方言。如果它检测到正确的,你将不会看到指定与否之间的任何区别。



参考:
http://docs.jboss.org/hibernate/orm/5.0/userGuide/en -US / html_single /#portability-dialectresolver


I am using hibernate with Oracle database and there is one configuration for dialect, I understood that dialect is used to generate native sql. But I checked the output of generated queries on screen with dialect and without dialect, both seems to same, then what is the use of dialect? can somebody give an code example where in we can rectify this?

解决方案

What version of hibernate are you using ? Since version 3.2, hibernate is able to determine dialect automatically. If it detect the right one, you won't see any difference between specifying it or not.

Reference : http://docs.jboss.org/hibernate/orm/5.0/userGuide/en-US/html_single/#portability-dialectresolver

这篇关于差异:用方言和方言休眠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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