This one walks you through the Kotlin-specific traps in JPA entity mapping, especially why data classes break Hibernate's identity semantics and corrupt Set membership after state changes. It covers ID-based equality patterns, uniqueness constraints at both the database and application layer to avoid race conditions, and the usual ORM hazards like N+1 queries and lazy load triggers. The guardrails are sensible: no data class entities, no blanket FetchType.EAGER fixes, maintain both sides of bidirectional associations. If you're debugging LazyInitializationException or wondering why your entity disappeared from a HashSet after you changed a field, this is the reference you want. JetBrains authored it, so the Kotlin idioms are sound.
npx skills add https://github.com/kotlin/kotlin-agent-skills --skill kotlin-backend-jpa-entity-mapping