There are several questions about this, and reading them does not help me. In Eric Evans' DDD, he uses an example address that is a value type in certain situations. For a mailing company, an address is a type of value, since it doesn’t really matter if the common address is, who else lives at the address, just for the packet to arrive at the address.
It makes sense to me until I start thinking about how it will be created. Given the chart on page 99, it has the following:
+------------+ |Customer | +------------+ |customerId | |name | |street | |city | |state | +------------+
This changes to:
+------------+ |Customer | (entity) +------------+ |customerId | |name | |address | +------------+ +------------+ |Address | (value object) +------------+ |street | |city | |state | +------------+
If these were tables, the address would have its own Identifier in order to have a relationship with the client, turning it into an entity.
Is the idea that in a relational database they will remain in the same table, for example, in the first example, and that you should use the ORM functions for the abstract address as an object of value (for example, the function of the nHibernate component)
I understand that a few pages later he talks about denormalization, I'm just trying to make sure that I understand the concept correctly.
domain-driven-design
user500038
source share