Add hibernate-jpa module: 40 runnable Hibernate 7 / JPA interview answers on PostgreSQL 16

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cfo2K4u4rF18QsPXPFnytf
This commit is contained in:
2026-10-24 17:33:29 +00:00
co-authored by Claude Sonnet 5.5
parent a5fbf45971
commit d03962ea9c
87 changed files with 2387 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
# hibernate-jpa
Companion code for **Top 40 Hibernate and JPA Interview Questions (2026) with Runnable Answers** on ankurm.com.
One test per question (`src/test/java/lab/hibernate/A_...F_*`). Each test writes its own transcript to `output/qNN-*.txt` and asserts the same facts, so an answer in the article that stops being true fails the build.
| Component | Version |
|---|---|
| Hibernate ORM | 7.4.13.Final |
| PostgreSQL | 16.15 (server), pgjdbc 42.7.14 |
| JUnit | 6.1.3 |
| JDK | 25.0.5 |
```bash
./scripts/start-postgres.sh # throwaway PostgreSQL on :5433 (or point LAB_DB_URL at your own)
./scripts/run-all.sh # runs 40 tests, rewrites output/
```
The test JVM runs with `-Duser.timezone=UTC` (see `pom.xml`): a PostgreSQL build without a complete tz database rejects some JVM default zones at connect time.