Disadvantages of Hibernate

Although Hibernate has so many benefits to use, it also has some of the drawbacks.

Let’s see the drawbacks of Hibernate

Performance Cost

Hibernate generates lot of SQL statements in runtime based on our mapping , so it is bit slower than JDBC.

If we use JDBC, then we directly write our queries, so no extra effort is required.

Does not allow multiple inserts

Hibernate does not allow some queries which are supported by JDBC.

For example, It does not allow to insert multiple objects (persistent data) to same table using single query.

Developer has to write separate query to insert each object.

More Comlpex with joins

If there are lot of mappings and joins among the tables, then code becomes bit complex to understand as we need to define the mapping and join information in the XML file.

Poor performance in Batch processing:

It advisable to use pure JDBC for batch processing as Hibernate peformance is not good in Batch processing.

Not good for small project

Small project will have less number of tables , introducing entire Hibernate framework will be overhead than useful.

Learning curve

As many other tool, Hibernate also takes considerable amount of time and effort to learn. I can’t say it is 100% disadvantage but yes it’s not so easy to learn.

So because of steep learning curve, we may consider it as disadvantage.

About the Author

Karibasappa G C (KB)
Founder of javainsimpleway.com
I love Java and open source technologies and very much passionate about software development.
I like to share my knowledge with others especially on technology 🙂
I have given all the examples as simple as possible to understand for the beginners.
All the code posted on my blog is developed,compiled and tested in my development environment.
If you find any mistakes or bugs, Please drop an email to kb.knowledge.sharing@gmail.com

Connect with me on Facebook for more updates

Share this article on