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
- Use "JPA and Hibernate Patterns" with your Muse.
- 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:
Install
Copy the install package below, then paste it into MuseThe install prompt below already includes the vetting steps: your agent follows the community checklist before installing anything with executable code. Want more?
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://github.com/affaan-m/ECC/blob/main/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.
Questions
How do I install a build?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the build 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 build before installing it.