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
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.
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.
It’s Really helpful for me as a beginner Thank you so much for sharing your Knowledge With us.