Hibernate Configuration Properties

By: Felix Emailed: 1673 times Printed: 2153 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

The table below lists the Hibernate Configuration Properties and their purpose. For easier understanding, and example is also provided for each property.
Property name Purpose
hibernate.dialect The classname of a Hibernate org.hibernate.dialect.Dialectwhich allows Hibernate to generate SQL optimized for a particular relational database.

e.g. full.classname.of.Dialect

In most cases Hibernate will actually be able to choose the correct org.hibernate.dialect.Dialect implementation based on the JDBC metadata returned by the JDBC driver.

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

e.g. true | false

hibernate.format_sql Pretty print the SQL in the log and console. 

e.g. true | false

hibernate.default_schema Qualify unqualified table names with the given schema/tablespace in generated SQL. 

e.g. SCHEMA_NAME

hibernate.default_catalog Qualifies unqualified table names with the given catalog in generated SQL. 

e.g. CATALOG_NAME

hibernate.session_factory_name The org.hibernate.SessionFactory will be automatically bound to this name in JNDI after it has been created.

e.g. jndi/composite/name

hibernate.max_fetch_depth Sets a maximum "depth" for the outer join fetch tree for single-ended associations (one-to-one, many-to-one). A 0disables default outer join fetching.

e.g. recommended values between 0 and 3

hibernate.default_batch_fetch_size Sets a default size for Hibernate batch fetching of associations. 

e.g. recommended values 4, 8, 16

hibernate.default_entity_mode Sets a default mode for entity representation for all sessions opened from this SessionFactory

dynamic-map, dom4j, pojo

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

e.g. true| false

hibernate.generate_statistics If enabled, Hibernate will collect statistics useful for performance tuning. 

e.g. true | false

hibernate.use_identifier_rollback If enabled, generated identifier properties will be reset to default values when objects are deleted. 

e.g. true | false

hibernate.use_sql_comments If turned on, Hibernate will generate comments inside the SQL, for easier debugging, defaults to false.

e.g. true | false

hibernate.id.new_generator_mappings Setting 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 to false to keep backward compatibility.

e.g. true | false

Hibernate Home | All Hibernate Tutorials | Latest Hibernate Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Felix
Hibernate JDBC and Connection Properties
Hibernate Transaction Properties
Hibernate Cache Properties
Hibernate Configuration Properties
Creating Connection Pool for JDBC Connections in Hibernate
SessionFactory in Hibernate
Programmatic configuration in Hibernate
Contextual sessions in Hibernate
Some Basic APIs in Hibernate
A sample Hibernate Web Application using Servlets
Step by Step Hibernate - Your First Hibernate Application
Tutorial Using the Java Persistence API (JPA) in Hibernate
Download Hibernate latest version

More Tutorials in Hibernate
Fetching strategies in Hibernate
equals() and hashCode() in Hibernate
Tuplizers (org.hibernate.tuple.Tuplizer) in Hibernate
EntityNameResolvers in Hibernate
Hi/lo algorithm in Hibernate
Identity columns and sequences in Hibernate
Assigned identifiers in Hibernate
Primary keys assigned by triggers in Hibernate
Formula in Hibernate
Step by Step Hibernate - Your First Hibernate Application
A sample Hibernate Web Application using Servlets
Some Basic APIs in Hibernate
Contextual sessions in Hibernate
Programmatic configuration in Hibernate
SessionFactory in Hibernate

More Latest News
Most Viewed Articles (in Hibernate )
Hibernate Vs. JDBC ( A comparison)
Download Hibernate latest version
Formula in Hibernate
Step by Step Hibernate - Your First Hibernate Application
A sample Hibernate Web Application using Servlets
Programmatic configuration in Hibernate
Creating Connection Pool for JDBC Connections in Hibernate
Hibernate JDBC and Connection Properties
Fetching strategies in Hibernate
Tuplizers (org.hibernate.tuple.Tuplizer) in Hibernate
EntityNameResolvers in Hibernate
Hi/lo algorithm in Hibernate
Identity columns and sequences in Hibernate
Types of inheritence models in Hibernate
Paging Through the Result Set in Hibernate
Most Emailed Articles (in Hibernate)
Hibernate Vs. JDBC ( A comparison)
Programmatic configuration in Hibernate
Step by Step Hibernate - Your First Hibernate Application
equals() and hashCode() in Hibernate
Delta Electronics Chairman Bruce Cheng Endows NCKU Build Y.S. Sun Green Building Research Center
A sample Hibernate Web Application using Servlets
Some Basic APIs in Hibernate
Contextual sessions in Hibernate
Creating Connection Pool for JDBC Connections in Hibernate
Hibernate Cache Properties
Hibernate Transaction Properties
Tuplizers (org.hibernate.tuple.Tuplizer) in Hibernate
EntityNameResolvers in Hibernate
Hi/lo algorithm in Hibernate
Identity columns and sequences in Hibernate