jpa-patterns

Eliminate JPA/Hibernate pitfalls in Spring Boot data layers.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/luongldptit/move-ticket --skill jpa-patterns-luongldptit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jpa-patterns
Source: https://github.com/luongldptit/move-ticket/tree/main/.agent/skills/jpa-patterns
Command: npx skills add https://github.com/luongldptit/move-ticket --skill jpa-patterns-luongldptit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates common JPA/Hibernate pitfalls in Spring Boot applications, including N+1 query issues, inefficient entity design, slow database performance, and misconfigured transactions that cause bugs and latency in production.

Core Features & Use Cases

  • Entity & Relationship Design: Provides patterns for proper JPA entity mapping, relationship configuration, and indexing for frequent query filters.
  • Performance Optimization: Guides N+1 prevention, fetch strategy selection, DTO projection usage, and HikariCP connection pool tuning for high-throughput applications.
  • Production Best Practices: Standardizes transaction management, pagination, auditing, soft deletes, and database migration workflows for reliable Spring Boot data layers. Use Case: For a Spring Boot e-commerce platform, use this skill to design efficient product-category relationships, optimize product listing queries to avoid N+1 issues, and configure connection pooling for peak traffic events.

Quick Start

Use the jpa-patterns skill to design a JPA entity for a 'Product' table with proper indexing, lazy-loaded category relationships, and auditing fields for your Spring Boot service.

Frequently Asked Questions about jpa-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix N+1 query issues in Spring Boot JPA?

To fix N+1 query issues in Spring Boot JPA, apply proper fetch strategy selection, DTO projections, and entity relationship patterns to optimize data access and eliminate redundant database calls.

What's the best way to model JPA entity relationships for high-traffic applications?

The best way to model JPA entity relationships for high-traffic applications is using efficient mapping configurations, lazy-loaded associations, and database indexing on frequent query filters to ensure optimal performance.

How do I tune HikariCP connection pooling in Spring Boot?

Tune HikariCP connection pooling in Spring Boot by applying standardized pool configurations and transaction management patterns to achieve reliable, high-throughput database access.

How do I implement soft delete and auditing in Hibernate?

Implement soft delete and auditing in Hibernate by applying production-ready JPA patterns that standardize entity modeling, track modification fields, and maintain data integrity without physical row deletion.

When should I use DTO projections instead of entity fetching in JPA?

Use DTO projections instead of entity fetching in JPA when optimizing read-heavy operations, preventing N+1 query pitfalls, and minimizing database payload size for specific Spring Boot data layer tasks.