What problem does it solve? In a DDD hexagonal architecture, mixing domain models with JPA entities, misusing transactions across dual DataSources, and mishandling schema evolution cause subtle, late-discovered bugs. This Skill codifies the persistence rules of the ProvinceHow (smash) backend so entities, repositories, transactions, and batch writers are written consistently and safely. ## Core Features & Use Cases - Domain/JPA Separation: Enforces separate domain models, JpaEntity classes, hand-written Mappers, and Repository port/adapter layers, with cross-Aggregate references stored as code columns instead of object relations. - Dual DataSource Transaction Safety: Mandates explicit transactionManager = "dataTransactionManager" on application-layer @Transactional annotations so operations never silently bind to the wrong transaction manager. - Batch Upsert & Schema Rules: Standardizes JdbcBatchItemWriter with ON DUPLICATE KEY UPDATE, Processor-side value-object validation, and documents the limits of hbm2ddl.auto=update including the RENAME INDEX workaround for legacy FK indexes. - Use Case: When adding a new JPA entity, repository query, JPQL projection, or Spring Batch writer to the smash backend, apply these conventions to keep the hexagonal boundaries and MySQL schema consistent. ## Quick Start Ask the AI to create a new JPA entity and repository adapter for a domain concept following the persistence-conventions rules.