| Recommend this page to a friend! |
| Packages of ?????? ??????? | Adaptive Entity Manager | docs/guides/aem-and-ddd.md | Download |
|
|
||||||||||||||||||||
AEM and DDDUsing Adaptive Entity Manager with domain-driven design ideas: value objects, persistence-ignorant domain types, and repository-oriented access?without forcing AEM contracts into the domain. AEM does not implement full DDD tactical patterns (aggregates, domain events, sagas). It helps with mapping and persistence at the infrastructure edge. What AEM supports wellValue objects on entities
Example metadata (infrastructure):
Domain stays free of Repository-shaped accessExpose aggregate roots or use cases through interfaces; implement with AEM in infrastructure (hexagonal guide). Legacy and uneven schemasMap odd columns to rich types (VOs, booleans with What to decide explicitly (AEM will not decide for you)| Topic | Your choice | |-------|-------------| | Aggregate boundaries | Which roots you load/save as a consistency unit | | Reconstitution | Named constructors vs reflection hydration (AEM hydrates without calling entity constructors by default) | | Lazy loading inside aggregates | Often discouraged; AEM allows it?use deliberately | | Domain events | Outside AEM lifecycle; wire in application layer | | Cross-aggregate references | IDs vs entities; adapter and metadata design | Future aggregate-oriented metadata ( Anti-patterns to avoid
Suggested reading order
Related guides |