JPA and Hibernate Patterns
Model and tune JPA with Muse: entity design, relationships, N+1 prevention, transactions, pagination, indexing, HikariCP pooling, caching, and Flyway/Liquibase migrations.
- What
- Model and tune JPA with Muse: entity design, relationships, N+1 prevention, transactions, pagination, indexing, HikariCP pooling, caching, and Flyway/Liquibase migrations.
- Cost
- Free
- Needs
- none to install. Pure guidance; a Spring Boot JPA project helps.
- Level
- Beginner
- Install
- Copy the installer prompt below into your Muse — your agent does the rest.
Curated by Skill Harbor: a JPA and Hibernate pattern guide that makes Muse design entities and fix data-access performance the way experienced Spring developers do. Entity design covers table mappings with indexes declared up front, auditing with @CreatedDate and @LastModifiedDate, and enum storage as STRING instead of ordinal. Relationships default to lazy loading with JOIN FETCH queries where needed, and the guide is explicit about avoiding EAGER on collections in favor of DTO projections for read paths. Repositories cover derived queries, @Query with Pageable, and interface projections for lightweight reads. Transactions get @Transactional on service methods with readOnly on read paths and a warning against long-running transactions. Pagination covers PageRequest with sorting plus cursor-style id-based paging for large sets. Performance covers composite indexes matching query patterns, batch writes with saveAll and hibernate.jdbc.batch_size, HikariCP pool sizing properties, and cautious second-level cache use with a real eviction strategy. Migrations insist on Flyway or Liquibase, never Hibernate auto DDL in production, with idempotent additive changes. Testing prefers @DataJpaTest with Testcontainers and SQL logging to prove query efficiency. By @affaan-m, listed here with credit to its creator. From the affaan-m/ECC repository (MIT). Honest caveats: Spring Boot focused, so adapt if you run plain Jakarta EE; profiling your own queries beats any generic rule. Skill Harbor never reviews the code, review it yourself before use.
Version:
Quick answer
JPA and Hibernate Patterns is a free Muse skill and guide that makes Muse design entities and fix data-access performance as Spring developers do. Entity design covers table mappings with indexes declared up front, auditing with creation and modification dates, and enum storage as string instead of ordinal. It also covers relationships, N+1 prevention, transactions, pagination, HikariCP pooling and caching.
Install
Copy the install package below, then paste it into Muse🧪 Install ran in our test sandbox · Nov 11, 2026📌 Pinned version: commit 4eb71d9Pinned version: install the code at commit 4eb71d92a39cab44ad40ac9d8a6a5ccb4029d6c2 exactly (Skill Harbor tested this version). Do not substitute a newer version. If this commit is unreachable, stop and tell me. Use "JPA and Hibernate Patterns" with your Muse. Prerequisites: none to install. Pure guidance; a Spring Boot JPA project helps. 1. Open the skill: https://raw.githubusercontent.com/affaan-m/ECC/4eb71d92a39cab44ad40ac9d8a6a5ccb4029d6c2/skills/jpa-patterns/SKILL.md and copy the full SKILL.md text. 2. Paste it into a chat with Muse and add: "Review these JPA entities and repositories for N+1 risks and mapping issues: [paste code]." 3. Ask follow-ups like "rewrite this query with JOIN FETCH" or "design the indexes for these read paths." Tip: paste your Hibernate SQL logs too and ask "which queries here are N+1 candidates?" Safety: a skill is plain-text instructions; it runs nothing by itself. Never run schema migrations against production without a backup and a reviewed plan.
Saved to your recent installs. Find it anytime on /connect.
🔒 Security, provenance and what this touches
The install prompt below already includes the vetting steps: your agent follows the community checklist before installing anything with executable code. Want more?
Verification certificate
Dated facts about what was checked for this listing, and how. This is not a safety certification.
- Pinned version
- 4eb71d9 · 2026-10-13
- Sandbox install test
- Install ran in our test sandbox · Nov 11, 2026
- Creator identity
- Not verified
- Fingerprint watch
- Last checked · Nov 21, 2026 : no change detected in the files linked by this install prompt
- Install prompt analysis
- 2026-10-13 : No commands, network calls, packages, file writes or API keys detected.
Skill Harbor never reviews the code of a listed skill. These are dated facts about the install prompt and our install test, not a safety certification. Review a skill yourself before you install it. How we verify
Questions
How do I install a skill?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the skill up for you — no manual configuration.
Where does my money go?
Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.
What does the ✓ next to a creator’s name mean?
It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a skill before installing it.