
Jpa Patterns
This covers the JPA/Hibernate fundamentals you actually need for Spring Boot apps. It handles entity design patterns with proper indexing, relationship mapping that avoids N+1 queries, and repository patterns with DTO projections for performance. The transaction guidance is solid, especially the readOnly optimization tips. What I like most is the practical focus on connection pooling configuration and the emphasis on using Testcontainers for realistic data access testing. It's heavy on code examples and light on theory, which is exactly what you want when you're debugging why your queries are slow or setting up auditing.
- skills.sh installs
- 5.8K
- GitHub stars
- 229.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add affaan-m/everything-claude-code --skill jpa-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
JPA/Hibernate Patterns
Use for data modeling, repositories, and performance tuning in Spring Boot.
When to Activate
- Designing JPA entities and table mappings
- Defining relationships (@OneToMany, @ManyToOne, @ManyToMany)
- Optimizing queries (N+1 prevention, fetch strategies, projections)
- Configuring transactions, auditing, or soft deletes
- Setting up pagination, sorting, or custom repository methods
- Tuning connection pooling (HikariCP) or second-level caching
Entity Design
@Entity
@Table(name = "markets", indexes = {
@Index(name = "idx_markets_slug", columnList = "slug", unique = true)
})
@EntityListeners(AuditingEntityListener.class)
public class MarketEntity {
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false, length = 200)
private String name;
@Column(nullable = false, unique = true, length = 120)
private String slug;
@Enumerated(EnumType.STRING)
private MarketStatus status = MarketStatus.ACTIVE;
@CreatedDate private Instant createdAt;
@LastModifiedDate private Instant updatedAt;
}
Enable auditing:
@Configuration
@EnableJpaAuditing
class JpaConfig {}
Sponsors
Details
- Repository
- github.com/affaan-m/everything-claude-code
- Category
- Java & JVM
More from affaan-m/everything-claude-code
All 256- Laravel Patterns5.8K
- Clickhouse Io5.7K
- Eval Harness5.7K
- Laravel Security5.7K
- Cpp Testing5.6K
- Iterative Retrieval5.6K
- Agent Harness Construction5.5K
- Configure Ecc5.5K
- Nutrient Document Processing5.5K
- Search First5.5K
- Verification Loop5.5K
- Agentic Engineering5.4K
- Cost Aware Llm Pipeline5.4K
- Django Verification5.4K
- Springboot Verification5.4K
- Codebase Onboarding5.3K
- Deep Research5.3K
- Rust Testing5.3K
- Ai First Engineering5.2K
- Autonomous Loops5.2K
- Content Engine5.2K
- Content Hash Cache Pattern5.2K
- Kotlin Coroutines Flows5.2K
- Swiftui Patterns5.2K