From How are Value Objects stored in the database? :
Assume that a Company and Person both have the same mail Address. Which of these statements do consider valid?
1."If I modify Company.Address, I want Person.Address to automatically get those changes"
2."If I modify Company.Address, it must not affect Person.Address"
If 1 is true, Address should be an Entity
If 2 is true, Address should be a Value Object.
Shouldn't in the above model the mail Address
be a Value Object, since even if Company
and Person
have same mail, this mail still doesn't have a conceptual identity?
In other words, if initially Company
and Person
share initial.address@gmail.com, but then get new mail new.address@gmail.com, then we can argue that mail address initial.address@gmail.com itself didn't changed, instead Company
and Person
replaced it by new.address@gmail.com ?
Thus to my understanding a mere fact that Address
is shared shouldn't be enough to give it personality (ie identity)?!
Thank you