This one walks you through JPA and Hibernate for production Java apps, covering entity relationships, query optimization, and the dreaded N+1 problem. You get practical examples on JOIN FETCH versus EntityGraph, batch fetching strategies, transaction management, and caching configuration. The quick reference shows real entity mapping patterns and repository queries that actually prevent lazy loading issues. If you're debugging LazyInitializationExceptions or wondering why your API makes 500 database calls per request, the troubleshooting section breaks down the usual suspects. It assumes you know Spring Boot basics but need to stop your persistence layer from tanking performance.

skills.sh installs
620
GitHub stars
42
last updated
Aug 21, 2026

Install

$ npx -y skills add pluginagentmarketplace/custom-plugin-java --skill java-jpa-hibernate --agent claude-code

Installs into .claude/skills of the current project.

Files

Java JPA Hibernate Skill

Master data persistence with JPA and Hibernate for production applications.

Overview

This skill covers JPA entity design, Hibernate optimization, Spring Data repositories, query strategies, and caching. Focuses on preventing N+1 queries and building high-performance persistence layers.

When to Use This Skill

Use when you need to:

  • Design JPA entities with relationships
  • Optimize database queries
  • Configure Hibernate for performance
  • Implement caching strategies
  • Debug persistence issues

Topics Covered

Entity Design

  • Entity mapping annotations
  • Relationship types (1:1, 1:N, N:M)
  • Inheritance strategies
  • Lifecycle callbacks
  • Auditing

Query Optimization

  • N+1 problem prevention
  • JOIN FETCH vs EntityGraph
  • Batch fetching
  • Projections and DTOs

Transactions

  • @Transactional configuration
  • Propagation and isolation
  • Optimistic vs pessimistic locking
  • Deadlock prevention

Caching

  • First and second level cache
  • Query cache
  • Cache invalidation
  • Redis integration

Quick Reference

// Entity with relationships
@Entity
@Table(name = "orders")
public class Order {

Sponsors

Details

Repository
github.com/pluginagentmarketplace/custom-plugin-java
Categories
Debugging, Java & JVM, Design & UI/UX
First seen
Jun 3, 2026

More from pluginagentmarketplace/custom-plugin-java

All 12

Recommended

More Debugging
1langgenius avatarvercel-react-best-practiceslanggenius/difyReact and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js c612skills.sh installs
2mohitmishra786 avatarpgomohitmishra786/low-level-dev-skillsProfile-guided optimisation skill for C/C++ with GCC and Clang. Use when squeezing maximum runtime performance after standard optimisation plateaus, implementin610skills.sh installs
3adobe avataraem-replicationadobe/skillsSingle entry point for all AEM 6.5 LTS Replication skills. Covers configuring replication agents, activating/deactivating content, using the Replication API pro604skills.sh installs
4davila7 avatarprompt-engineeringdavila7/claude-code-templatesExpert guide on prompt engineering patterns, best practices, and optimization techniques. Use when user wants to improve prompts, learn prompting strategies, or604skills.sh installs
5withastro avatarastro-developerwithastro/astroComprehensive guide for developing in the Astro monorepo. Covers architecture, debugging, testing, and critical constraints. Use when working on features, fixes596skills.sh installs
6aj-geddes avatardatabase-query-optimizationaj-geddes/useful-ai-promptsImprove database query performance through indexing, query optimization, and execution plan analysis. Reduce response times and database load.593skills.sh installs