What problem does it solve? JPA and Hibernate applications often fire one query per row when accessing lazy associations, turning a single endpoint call into dozens of SQL selects. This Skill guides the choice and application of the correct remediation for each N+1 pattern instead of applying a one-size-fits-all fix. ## Core Features & Use Cases - Decision-table remediation: Selects the right fix based on three triage questions (read-only vs managed entities, pagination, number of collections), covering DTO projections, JOIN FETCH, @EntityGraph, batch fetching, the two-query pattern, and SUBSELECT. - Root-cause hygiene: Enforces LAZY mappings on to-one associations, disables Open-Session-In-View, and sets a global batch-fetch safety net to prevent whole classes of N+1. - Pitfall and version guidance: Covers the HHH000104/HHH90003004 pagination trap, MultipleBagFetchException, inverse @OneToOne lazy loading, and Hibernate 5 to 6 migration differences. - Use Case: A Spring Boot endpoint returns a list of teams and fires 11 SELECT statements instead of 1; the Skill identifies it as a read-only list and applies a DTO constructor projection so the query count stays constant. ## Quick Start Ask the assistant to fix the N+1 select problem in a specific JPA repository method or REST endpoint using this skill.