# Kotlin JPA entities

> Models JPA entities in Kotlin with correct equality, fetching and relations, so you avoid N+1 and lazy errors.

- Page: https://youraiskill.com/skill/kotlin-kotlin-backend-jpa-entity-mapping
- What it does: Model Kotlin persistence code correctly for Spring Data JPA and Hibernate. Covers entity design, identity and equality, uniqueness constraints, relationships, fetch plans, and common ORM (Object-Relational Mapping) traps specific to Kotlin. Use when creating or reviewing JPA (Java Persistence API) entities, diagnosing N+1 or LazyInitializationException, placing indexes and uniqueness rules, or preventing Kotlin-specific bugs such as data class entities and broken equals/hashCode.
- Niches: backend
- Licence: Apache-2.0
- Status: Checked: open licence, author credited, passed the YourAISkill safety scan. Can be added to a paid pack.
- Contents: instructions and reference files only (1 files)

To add it, see https://youraiskill.com/guides/how-to-add-a-skill-to-claude
