Hibernate.orgCommunity Documentation

Appendix A. Configuration properties

Table of Contents

A.1. General Configuration
A.2. Database configuration
A.3. Connection pool properties
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.

hibernate.show_sql

true or false

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

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.
hibernate.default_batch_fetch_size

4,8, or 16

Default size for Hibernate batch fetching of associations.
hibernate.default_entity_mode

dynamic-map or pojo

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

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.
hibernate.generate_statistics

true or false

Causes Hibernate to collect statistics for performance tuning.
hibernate.use_identifier_rollback

true or false

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

true or false

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



Note

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