C.1. Getting Fluent in the Local SQL

Hibernate ships with detailed support for many commercial and free relational databases. While most features will work properly without doing so, it's important to set the hibernate.dialect configuration property to the right subclass of net.sf.hibernate.dialect.Dialect, especially if you want to use features like native or sequence primary key generation or session locking. Choosing a dialect is also a very convenient way of setting up a whole raft of Hibernate configuration parameters you'd otherwise have to deal with individually.

Database systemAppropriate hibernate.dialect setting
DB2net.sf.hibernate.dialect.DB2Dialect
FrontBasenet.sf.hibernate.dialect.FrontbaseDialect
HSQLDBnet.sf.hibernate.dialect.HSQLDialect
Informixnet.sf.hibernate.dialect.InformixDialect
Ingresnet.sf.hibernate.dialect.IngresDialect
Interbasenet.sf.hibernate.dialect.InterbaseDialect
Mckoi SQLnet.sf.hibernate.dialect.MckoiDialect
Microsoft SQL Servernet.sf.hibernate.dialect.SQLServerDialect
MySQLnet.sf.hibernate.dialect.MySQLDialect
Oracle (any version)net.sf.hibernate.dialect.OracleDialect
Oracle 9 (specifically)net.sf.hibernate.dialect.Oracle9Dialect
Pointbasenet.sf.hibernate.dialect.PointbaseDialect
PostgreSQLnet.sf.hibernate.dialect.PostgreSQLDialect
Progressnet.sf.hibernate.dialect.ProgressDialect
SAP DBnet.sf.hibernate.dialect.SAPDBDialect
Sybasenet.sf.hibernate.dialect.SybaseDialect
Sybase Anywherenet.sf.hibernate.dialect.SybaseAnywhereDialect

If you don't see your target database here, check whether support has been added to the latest Hibernate release. The dialects are listed in the "SQL Dialects" section of the Hibernate reference documentation. If that doesn't pan out, see if you can find a third-party effort to support the database, or consider starting your own!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset