12.2.4. Configuration Hibernate Configuration Properties

Table 12.1. Properties

Property Name Description
The classname of a Hibernate org.hibernate.dialect.Dialect. Allows Hibernate to generate SQL optimized for a particular relational database.
In most cases Hibernate will be able to choose the correct org.hibernate.dialect.Dialect implementation, based on the JDBC metadata returned by the JDBC driver.
Boolean. Writes all SQL statements to console. This is an alternative to setting the log category org.hibernate.SQL to debug.
Boolean. Pretty print the SQL in the log and console.
Qualify unqualified table names with the given schema/tablespace in generated SQL.
Qualifies unqualified table names with the given catalog in generated SQL.
The org.hibernate.SessionFactory will be automatically bound to this name in JNDI after it has been created. For example, jndi/composite/name.
Sets a maximum "depth" for the outer join fetch tree for single-ended associations (one-to-one, many-to-one). A 0 disables default outer join fetching. The recommended value is between 0 and 3.
Sets a default size for Hibernate batch fetching of associations. The recommended values are 4, 8, and 16.
Sets a default mode for entity representation for all sessions opened from this SessionFactory. Values include: dynamic-map, dom4j, pojo.
Boolean. Forces Hibernate to order SQL updates by the primary key value of the items being updated. This will result in fewer transaction deadlocks in highly concurrent systems.
Boolean. If enabled, Hibernate will collect statistics useful for performance tuning.
Boolean. If enabled, generated identifier properties will be reset to default values when objects are deleted.
Boolean. If turned on, Hibernate will generate comments inside the SQL, for easier debugging. Default value is false.
Boolean. This property is relevant when using @GeneratedValue. It indicates whether or not the new IdentifierGenerator implementations are used for javax.persistence.GenerationType.AUTO, javax.persistence.GenerationType.TABLE and javax.persistence.GenerationType.SEQUENCE. Default value is true.


For hibernate.id.new_generator_mappings, new applications should keep the default value of true. Existing applications that used Hibernate 3.3.x may need to change it to false to continue using a sequence object or table based generator, and maintain backward compatibility.