Files
java-interview-lab/hibernate-jpa/README.md
T

20 lines
832 B
Markdown

# 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.