Skip to content

Entity

Medium — good to knowBackend

ELI5 — The Vibe Check

An entity is a domain object with a unique identity that persists over time. A user is an entity — even if they change their name and email, they're still the same user because of their ID. Entities are tracked by who they ARE, not what they contain.

Real Talk

In domain-driven design, an entity is a domain object distinguished by its identity rather than its attributes. Two entities with identical attributes but different IDs are different objects. Entities have a lifecycle, can change state over time, and typically map to database records. They encapsulate business behavior and enforce domain invariants.

When You'll Hear This

"User is an entity — it has a unique ID that never changes even when attributes update." / "Entities maintain identity continuity across state changes."

Made with passive-aggressive love by manoga.digital. Powered by Claude.