I haven't really seen any examples, but I assume that they are saved inside the containing entity table within the database.
Ie. If I have a Person entity/aggregate root and a corresponding Person table, if it had a Value Object called Address, Address values would be saved inside this Person table!
Does that make sense for a domain where I have other entities such as Companies etc. that have an Address?
(I'm currently writing a project management application and trying to get into DDD)
VO
but we must use separate table because it's a collection ofVO
. Then theVO
(Address) in this example will have a foreign key from the containing entity and will have a key in DB! and this violates that value objects shouldn't have an identity. – Pict