recall

← recall

value object term

object identified by its attributes, not by identity

Two value objects with the same attributes are interchangeable. Money(10, USD) is the same as any other Money(10, USD); they're not 'this

    0 vs that
      0'. Immutable, pass-by-value, no id. Often holds invariants — Money can't be negative; Email must be valid format. Compare with entities, which have identity that persists even as their attributes change.

      aliases: VO

      topics: ddd, architecture

      references: