Hibernate.orgCommunity Documentation

Appendix A. Configuration properties

Table of Contents

A.1. Strategy configurations
A.2. General Configuration
A.3. Database configuration
A.4. Connection pool properties

Many configuration settings define pluggable strategies that Hibernate uses for various purposes. The configuration of many of these strategy type settings accept definition in various forms. The documentation of such configuration settings refer here. The types of forms available in such cases include:

short name (if defined)

Certain built-in strategy implementations have a corresponding short name.

strategy instance

An instance of the strategy implementation to use can be specified

strategy Class reference

A java.lang.Class reference of the strategy implementation to use can be specified

strategy Class name

The class name (java.lang.String) of the strategy implementation to use can be specified

hibernate.dialectA fully-qualified classname

The classname of a Hibernate org.hibernate.dialect.Dialect from which Hibernate can generate SQL optimized for a particular relational database.

In most cases Hibernate can choose the correct org.hibernate.dialect.Dialect implementation based on the JDBC metadata returned by the JDBC driver.


true or false

Write all SQL statements to the console. This is an alternative to setting the log category org.hibernate.SQL to debug.

true or false

Pretty-print the SQL in the log and console.
hibernate.default_schemaA schema nameQualify unqualified table names with the given schema or tablespace in generated SQL.
hibernate.default_catalogA catalog nameQualifies unqualified table names with the given catalog in generated SQL.
hibernate.session_factory_nameA JNDI nameThe org.hibernate.SessionFactory is automatically bound to this name in JNDI after it is created.
hibernate.max_fetch_depthA value between 0 and 3Sets a maximum depth for the outer join fetch tree for single-ended associations. A single-ended assocation is a one-to-one or many-to-one assocation. A value of 0 disables default outer join fetching.

4,8, or 16

Default size for Hibernate batch fetching of associations.

dynamic-map or pojo

Default mode for entity representation for all sessions opened from this SessionFactory, defaults to pojo.

true or false

Forces Hibernate to order SQL updates by the primary key value of the items being updated. This reduces the likelihood of transaction deadlocks in highly-concurrent systems.

none, first or last

Defines precedence of null values in ORDER BY clause. Defaults to none which varies between RDBMS implementation.

true or false

Causes Hibernate to collect statistics for performance tuning.

true or false

If true, generated identifier properties are reset to default values when objects are deleted.

true or false

If true, Hibernate generates comments inside the SQL, for easier debugging.


Each of the properties in the following table are prefixed by hibernate.. It has been removed in the table to conserve space.

c3p0 connection pool properties

  • hibernate.c3p0.min_size

  • hibernate.c3p0.max_size

  • hibernate.c3p0.timeout

  • hibernate.c3p0.max_statements