Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Value Objects Vs Entities

Quick question... When approaching something like an email address the immediate idea is to treat this as a value object.

If we have a number of entities though, say a customer, a contact, and a supplier that are referencing the same email address, it is conceivable that when we change a customer's email address we may want the customer's contact, and they may be a supplier too, have that email change reflected with those entities as well. Am I correct in thinking this is giving the email address identity so it should now be represented as an entity?

Cheers,

Steve

like image 413
Steven Avatar asked Apr 29 '26 07:04

Steven


1 Answers

Yes, I believe you're on the right lines. See my previous answer here.

like image 56
Vijay Patel Avatar answered May 03 '26 08:05

Vijay Patel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!