Card 07/ 07

RecapDifficulty: Advanced1 min

What This Topic Established

JPA keeps a persistence context and does dirty checking — a change with no explicit save() still persists, verified. Spring Data JDBC has neither, and never leaves anything unloaded — which is why it has no lazy-loading failure to have, unlike JPA's LazyInitializationException outside a transaction, also verified.

Neither is the safer default — JDBC fits simple, flat domains needing predictable SQL; JPA fits genuine relationship depth. Spring Data JDBC forces one repository per aggregate root, a rule JPA has no equivalent to.