roadmap
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
Explain in an interview what Hibernate does with your entities: how it maps, tracks, flushes and loads them. Covers the SQL and JDBC beneath it, JPQL and Criteria, locking, caching and tuning.
382 of 382 questions in your plan: 0 known, 0 in progress, 0 due, 0 skipped, 382 new. 0 cut, outside your plan.
Hibernate usually surfaces inside the technical conversation of a Java or Kotlin backend loop, often the moment an entity appears in your code sample or you mention JPA, and from then on the questions are about the SQL your code produces. Expect a snippet and a prediction: how many statements a loop over orders sends, why changing a field on a loaded entity issues an `UPDATE` that no line of code asked for, what happens when a view template touches a lazy collection after the transaction has committed. A junior answer names the annotation or the fetch type. A stronger one explains the mechanism behind it: the snapshot compared at flush, the proxy that needs an open session, the version check Hibernate adds to the `WHERE` clause of an update. From senior level up the conversation tends to start from an incident, such as a page that slowed as its data grew, a lost update between two users or stale entities after a bulk `UPDATE`, and the interviewer wants to hear which evidence you would collect first, SQL logs or the statistics counters, before you choose a fix.
The first module sits underneath Hibernate, because nearly every later answer is a claim about what reaches the database. [Joins](/topics/lang-sql-joins) explain why a fetch join can return the same parent several times, and [JDBC](/topics/be-jdbc) is the API Hibernate drives on your behalf: connections, prepared statements, batches and the transaction a connection carries. The next four modules each open on the pattern their Hibernate topic implements, so the behaviour you meet in the product already has a name. [Object-relational mapping](/topics/found-enterprise-patterns-orm-mapping) precedes [entity mapping](/topics/be-hibernate-entity-mapping) with its identifiers, value types and inheritance strategies; two neighbours close that module, [always-on filters and audit stamps](/topics/be-orm-concepts-mapping-filters-stamps) and the question of [who owns the schema](/topics/be-orm-concepts-migrations-generated-ddl-vs-scripts), the mapping or the migration scripts. The [unit of work](/topics/found-enterprise-patterns-unit-of-work) then introduces the [persistence context](/topics/be-hibernate-persistence-context), the hinge of the whole plan: entity states, dirty checking and flushing shape most of what the later modules describe. [Lazy loading](/topics/found-enterprise-patterns-lazy-load) leads into [associations and fetching](/topics/be-hibernate-associations-fetching), where N+1 selects and `LazyInitializationException` both turn out to be questions about that context. Queries come after fetching on purpose, with the [transfer object](/topics/found-enterprise-patterns-dto-assembler) pattern ahead of them: [JPQL, HQL and Criteria](/topics/be-hibernate-hql-criteria) are largely a way to pick a fetch plan per use case, or to skip managed entities altogether. The last stretch is about many sessions at once. [Concurrency anomalies](/topics/db-relational-transactions-anomalies) and [isolation levels](/topics/db-relational-transactions-isolation-levels) come before Hibernate's own [transactions and locking](/topics/be-hibernate-transactions-locking), because `@Version` and the pessimistic lock modes answer problems the database defines. The [second-level cache](/topics/be-hibernate-caching) follows, since its concurrency strategies borrow those locking ideas, and [tuning](/topics/be-hibernate-performance) closes the plan with batching, read-only reads and the statistics that show whether any of it worked.
With a Spring or Jakarta EE interview close, the persistence context and fetching deserve the first hours, because most scenario questions begin there. Narrow importance to must know; study order already opens on by frequency, which suits this. With a few months, switch study order to by topics and run a small project with SQL logging switched on beside the questions, so each answer can be checked against the statements it predicts. Developers who use Hibernate daily can narrow level to middle and above and spend their hours on locking, the second-level cache and tuning, where the questions turn into incidents. The edge of this plan is the persistence layer. Spring Data repositories, `@Transactional` proxies and the application built around Hibernate belong to the [Spring Boot roadmap](/roadmaps/spring-boot); for the whole Java backend loop, the language, algorithms and system design rounds included, turn to the [Java Backend Developer roadmap](/roadmaps/java-developer).
Hibernate usually surfaces inside the technical conversation of a Java or Kotlin backend loop, often the moment an entity appears in your code sample or you mention JPA, and from then on the questions are about the SQL your code produces. Expect a snippet and a prediction: how many statements a loop over orders sends, why changing a field on a loaded entity issues an UPDATE that no line of code asked for, what happens when a view template touches a lazy collection after the transaction has committed.
A junior answer names the annotation or the fetch type. A stronger one explains the mechanism behind it: the snapshot compared at flush, the proxy that needs an open session, the version check Hibernate adds to the WHERE clause of an update. From senior level up the conversation tends to start from an incident, such as a page that slowed as its data grew, a lost update between two users or stale entities after a bulk UPDATE, and the interviewer wants to hear which evidence you would collect first, SQL logs or the statistics counters, before you choose a fix.
The first module sits underneath Hibernate, because nearly every later answer is a claim about what reaches the database. Joins explain why a fetch join can return the same parent several times, and JDBC is the API Hibernate drives on your behalf: connections, prepared statements, batches and the transaction a connection carries.
The next four modules each open on the pattern their Hibernate topic implements, so the behaviour you meet in the product already has a name. Object-relational mapping precedes entity mapping with its identifiers, value types and inheritance strategies; two neighbours close that module, always-on filters and audit stamps and the question of who owns the schema, the mapping or the migration scripts. The unit of work then introduces the persistence context, the hinge of the whole plan: entity states, dirty checking and flushing shape most of what the later modules describe. Lazy loading leads into associations and fetching, where N+1 selects and LazyInitializationException both turn out to be questions about that context. Queries come after fetching on purpose, with the transfer object pattern ahead of them: JPQL, HQL and Criteria are largely a way to pick a fetch plan per use case, or to skip managed entities altogether.
The last stretch is about many sessions at once. Concurrency anomalies and isolation levels come before Hibernate's own transactions and locking, because @Version and the pessimistic lock modes answer problems the database defines. The second-level cache follows, since its concurrency strategies borrow those locking ideas, and tuning closes the plan with batching, read-only reads and the statistics that show whether any of it worked.
With a Spring or Jakarta EE interview close, the persistence context and fetching deserve the first hours, because most scenario questions begin there. Narrow importance to must know; study order already opens on by frequency, which suits this. With a few months, switch study order to by topics and run a small project with SQL logging switched on beside the questions, so each answer can be checked against the statements it predicts. Developers who use Hibernate daily can narrow level to middle and above and spend their hours on locking, the second-level cache and tuning, where the questions turn into incidents.
The edge of this plan is the persistence layer. Spring Data repositories, @Transactional proxies and the application built around Hibernate belong to the Spring Boot roadmap; for the whole Java backend loop, the language, algorithms and system design rounds included, turn to the Java Backend Developer roadmap.