What are the contents of hibernate configuration file ( hibernate.cfg.xml )?



What are the contents of hibernate configuration file ( hibernate.cfg.xml )?..

Answer / Vinit Kumar Pandey

The Hibernate configuration file (hibernate.cfg.xml) contains various settings required to configure the Hibernate framework, such as:
1. Database connection properties - JDBC driver class, URL, username, and password.
2. Dialect - The dialect specifies the database-specific syntax that Hibernate should use when generating SQL statements.
3. Mappings - This section defines the mapping between Java classes and their corresponding database tables using XML mappings or annotations.
4. Caching - Configuration options for enabling and configuring first level cache (session cache) and second level cache.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Hibernate Interview Questions

What is the purpose of mapping?

1 Answers  


What hibernate save returns?

1 Answers  


What we can not do in jdbc but can do hibernate?

1 Answers  


How to integrate Hibernate and Spring frameworks?

1 Answers  


How mapping of java objects is done with database tables?

1 Answers  


What is concurrency strategies in hibernate?

1 Answers  


What is a persistence context?

1 Answers  


What is the difference between hibernate session get() and load() method?

1 Answers  


What is the use of sessionfactory?

1 Answers  


What is hibernate bag collection?

1 Answers  


Why do we use criteria in hibernate?

1 Answers  


What is the difference between one to one and one to many relationship?

1 Answers  


Categories