---
answer: direct
beat: dev-practices
source: 1 article · updated: November 13, 2026
---

How do you check equality of two entities versus two value objects?

Two entities are equal if they have the same identity, even if every attribute differs, because identity persists across change. Two value objects are equal if all their attributes are equal, because they have no identity. Two money objects of 10 USD are interchangeable. Two customers named the same are not.

Answered in

Entities, Value Objects, Aggregates: DDD's Building Blocks via Their Hardest Questions

How do you compare two entities? Two value objects? What does an aggregate protect? DDD's building blocks, explained by the question each one answers.

Crashtech Editorial November 13, 2026 Development Best Practices

Read the full analysis

Other questions this article answers

More development best practices questions

Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the Development Best Practices beat.