What problem does it solve? Designing correct, performant JPA persistence is hard: N+1 queries, lost updates, unbounded lock waits, and misconfigured transactions silently corrupt data or exhaust connection pools in production. This Skill encodes verified Spring Data JPA and Hibernate rules so entities, repositories, transactions, and locking behave predictably on any relational database. ## Core Features & Use Cases - Entity and association mapping: Enforces correct entity equality strategies, aggregate-scoped associations, LAZY to-one mappings, and alignment between mappings, migrations, and constraints. - Concurrency and locking: Provides per-operation strategy selection across optimistic locking with a composed retry annotation, pessimistic locks with engine-specific timeouts, and atomic conditional UPDATE statements. - Query and resource governance: Covers fetch plans, projections, pagination, sargable dynamic queries, statement and transaction timeouts, and connection pool sizing. - Use Case: When adding a stock-reservation feature, apply this Skill to choose a pessimistic lock or conditional UPDATE, bound the lock wait per database engine, and write concurrency tests that prove the conflict contract. ## Quick Start Use the spring-data-jpa skill to review my JPA entity mappings and repository queries for N+1 problems and correct optimistic locking.