domain-persistence

Enforce strict separation between Java domain models and JPA persistence entities.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/GreenFirst-kr/green_first_be --skill domain-persistence
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-persistence
Source: https://github.com/GreenFirst-kr/green_first_be/tree/main/.claude/skills/domain-persistence
Command: npx skills add https://github.com/GreenFirst-kr/green_first_be --skill domain-persistence

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams implement clean domain models (POJOs) that are decoupled from persistence concerns, ensuring a clear boundary between business logic and data access.

Core Features & Use Cases

  • Domain Model purity with ID-only references
  • Persistence Entity mapping with JPA annotations
  • Repository conversion via ModelMapper
  • VO patterns and type handling for UUID, BigDecimal, and BigInteger

Quick Start

Define a domain model and its persistence counterpart, then configure a repository to convert between them.

Frequently Asked Questions about domain-persistence

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I separate domain models from JPA persistence entities in a DDD project?

To separate domain models from JPA persistence entities, define pure POJOs for domain logic and JPA-annotated classes for data access, converting between them via ModelMapper in repositories to maintain clear boundaries.

Why does my domain model get polluted by JPA annotations and persistence logic?

Domain models get polluted when JPA annotations and persistence logic are placed directly in domain classes. Enforcing strict boundaries by keeping domain models as pure POJOs with IDs only prevents this coupling.

What is the best way to handle UUID and BigDecimal types between domain models and persistence entities?

The best way to handle UUID, BigDecimal, and BigInteger types is enforcing strict type handling during explicit conversions, ensuring these fields map correctly between pure POJO domain models and JPA persistence entities.

How do I configure repository conversion between domain models and persistence entities using ModelMapper?

Configure repository conversion by applying ModelMapper for explicit mappings, using static factory methods to instantiate objects and manually managing audit fields to keep domain and persistence boundaries distinct.

Does this domain-persistence separation approach work with standard Spring Data JPA architectures?

Yes, this approach works with standard Spring Data JPA architectures by applying typical DDD-style patterns, using VO patterns and explicit repository conversion to keep domain models decoupled from persistence concerns.

When do I need Value Object patterns in a domain-driven design architecture?

You need Value Object patterns when enforcing strict domain boundaries to encapsulate specific types like UUID or BigDecimal, ensuring domain models remain pure POJOs free from persistence entity annotations.