Commits
Tarun Sukhani authored a8e6e3fc519
fix(jpa): evict the whole second-level cache after a fixture load (PF-190) Fixtures.deleteDatabase() deletes with plain SQL, which Hibernate never sees, and JPAPlugin.afterFixtureLoad() cleared only each entity manager. The shared second-level cache kept the deleted rows, so finding a remembered id returned an entity whose row was gone (JClaw's JF-24, where the insert that referenced it then failed on the foreign key). afterFixtureLoad() now also calls Hibernate's evictAllRegions() on every persistence unit. Not JPA's Cache.evictAll(): Hibernate's evicts entity data alone and leaves cached collections and query results stale. The eviction covers the whole JVM, which the testing manual now says. Guarded by integration.FixturesSecondLevelCacheTest. The fixture app now has a second-level and query cache for it: MapRegionFactory, a map per region, since the framework ships no JCache provider, over the @Cache-annotated CachedShelf and CachedBook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>