Heuristics

Use ORM in your domain model when rate of change is low

Authors: Kenny Baas-Schwegler

Submitter: Kenny Baas-Schwegler

When can it be appropriate to use ORM mapping in my domain model?

Short description

When your domain model does not change quickly you can decide to use a ORM mapping framework (for instance: JPA, EntityFramework) in your domain. This way we don't need to create mapping between the domain model and the repository model.

Examples

A user inbox for keeping communication message to the customer, this does not change that fast.

Context

When we implement domain models with hexagonal or clean architecture we need to seperate the domain model from the repository model and create mappers. For small domains that don't change fast this can be a lot of work.

Tags

Follow us

Read our latest news from Virtual DDD on any of these social networks!

Recent heuristics

Discussed content

Sorry, no results found!

Whoops... we couldn't find what you're looking for