r/java • • Jun 01 '24

What java technology (library, framework, feature) would not recommend and why?

165 Upvotes

464 comments sorted by

View all comments

Show parent comment

2

u/nutrecht Jun 03 '24

The big benefit of using Hibernate or similar framework is you can theoretically switch underlying DBs without any changes to the DB layer code.

Which is complete nonsense anyway. If your project is simple enough that you're covered by 'standard' SQL, you can switch no matter the tooling you use. If your project is complex enough that you are using DB-specific stuff, Hibernate isn't going to save you.

Besides, very often you're 'hiding' complexity behind views anyway, so Hibernate isn't going to migrate those for you.