Attribute name |
Purpose |
hibernate.dialect |
Class Name of the nhibect dialect (dialect)-enables nhibect to use features of certain database platforms For example: full.classname.of.Dialect (If the dialect is created in nhib.pdf), orfull.classname.of.Dialect, assembly (If a custom dialect is used, it does not belong to nhib.pdf ). |
hibernate.default_schema |
In the generated SQL statement, the full qualified name of scheml/tablespace. For example: SCHEMA_NAME |
hibernate.prepare_sql |
Prepare SQL statements? For example: true |false |
hibernate.session_factory_name |
SessionFactory This name will be automatically bound after it is created.For example: some.name |
hibernate.use_outer_join |
Allow external connection capturing. For example:true |false |
hibernate.cache.provider_class |
Specify a customCacheProvider Class Name of the cache providerFor example: full.classname.of.CacheProvider (If icacheprovider is created in Nhibernate), orfull.classname.of.CacheProvider, assembly (If you use a custom icacheprovider, it does not belong to nhibprovider ). |
hibernate.query.substitutions |
Replace some phrases in the Nhibernate query with SQL phrases (for example, phrases may be functions or characters ). For example: hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC |
SQL dialect (SQL dialects)
You can always sethibernate.dialect
Dialect, which isNHibernate.Dialect.Dialect
. If you do not need to usenative
Orsequence
Automatically generate an algorithm for the primary key of or use pessimistic lockingISession.Lock()
OrIQuery.SetLockMode()
), You do not need to specify the dialect. However, if you specify a dialect, Hibernate uses special default values for some attributes listed above, saving you from manually specifying them.
Table 2.3Nhib1_ SQL Dialect(hibernate.dialect
)
RDBMS |
Dialect |
DB2 |
NHibernate.Dialect.DB2Dialect |
PostgreSQL |
NHibernate.Dialect.PostgreSQLDialect |
MySQL |
NHibernate.Dialect.MySQLDialect |
Oracle (Any Version) |
NHibernate.Dialect.OracleDialect |
Oracle 9/10g |
NHibernate.Dialect.Oracle9Dialect |
Sybase |
NHibernate.Dialect.SybaseDialect |
Microsoft SQL Server 2000 |
NHibernate.Dialect.MsSql2000Dialect |
Microsoft SQL Server 7 |
NHibernate.Dialect.MsSql7Dialect |
Firebird |
NHibernate.Dialect.FirebirdDialect |