r/javahelp • • Dec 09 '20

Should I really learn hibernate?

I am core java developer and had internship before using Spring boot to create rest api. I am also developing my own projects using boot and I really never had to know about Hibernate because Spring perfectly abstract database operations via JPA and we can handle every database operations without knowing what is in the background. So, should I really need to learn hibernate?

Can you give me scenarios where I should know about hibernate using Spring boot?

19 Upvotes

41 comments sorted by

View all comments

Show parent comments

1

u/LiteratureStriking Dec 09 '20

Is this something you are telling me you couldn't solve?

No, I am not saying that.

I am saying that it isn't trivial and would require rethinking the system design, for example migrating the system design to CQRS. Many applications might start off without separate read models and write models or clear separation between commands and queries, which would require analysis about the data flow of the entire system. This is entirely doable, but not at all trivial.

You might end up pushing JPA into the write model (since the session deals with tracking mutation), and push native queries to the read model (or views or materialized views on the DB) or to non-relational stores like Cassandra (with some machinery in the middle to keep the data stores in sync).

1

u/milkeater Dec 09 '20

Your comment of "you and the rest of the industry would really like to know" says otherwise.

You didn't come here to have a conversation, just to pump your own tires. Whether you believe it or not, you are speaking buzzwords and I can see right through it.

If you genuinely are struggling, read that system primer and practice with this book

You aren't the only one that is struggling in this area but that doesn't mean everyone is. Frankly there is a vendor model of providing services to lift and shift in bulk with large enterprises that experiments in the $100ks. It's one of the easiest and hottest paths I've seen of getting into FAANG or starting your own service.