Difference : hibernate with dialect and without di

2019-09-16 12:45发布

问题:

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?

回答1:

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