Relative Content

Tag Archive for value-object

Unique Value Object vs Entity

Trying to convert some entities into value objects I am stuck in a case where what seems a value object must be unique within an aggregate.

DDD: big immutable item with some references to entity identifiers, should it be object value or entity?

Let’s say I have a Mail, this mail have many properties given by the constructor (for example, 10-15 parameters).
This mail can’t be edited (immutable), the user has specifically requested to send this content. Mail has no methods but multiple constructors (for managing different scenarios), and it has few references on other entity identifiers (for example a reference on the identifier of the sender and the receiver).