What problem does it solve?
This Skill helps developers optimize their Java Persistence API (JPA) and Hibernate usage within Spring Boot applications, addressing common challenges in entity design, query performance, and transaction management.
Core Features & Use Cases
- Entity Design: Provides best practices for defining entities, including auditing and indexing.
- Relationship Management: Demonstrates how to handle one-to-many relationships and prevent N+1 query problems.
- Query Optimization: Offers strategies for efficient data retrieval using repositories and projections.
- Transaction & Pagination: Guides on proper transaction demarcation and implementing pagination.
- Performance Tuning: Includes advice on indexing, batch writing, connection pooling, and caching.
- Use Case: A developer struggling with slow database queries in their Spring Boot application can use this Skill to identify and implement optimizations for their JPA entities and repository methods.
Quick Start
Use the jpa-patterns skill to generate an example of an audited MarketEntity with a unique slug index.