Domain Driven Design in Go: Entities
By Dennis Vis • 9 min read
Where Value Objects represent pieces of immutable data without an identity, entities represent identifiable elements within our systems. Entities generally have a lifecycle. They can be created, oftentimes deleted and are expected to be mutated during their lifespan.
Entities are regarded as equal if their identities are equal. This means that, even if two entities contain different data, as long as their identifying field’s value is the same, they must be regarded as the same entity. In that situation, it’s likely that one of the entities is an updated version of the other.
In this post I’ll discuss how entities can be implemented in Go.
Read more >>