Two members named Asha are not the same member
transcript
Two members. Both named Asha. Same name, same app, same moment. Are they the same person?
Different ids. So, different people. Now rename M1 to Asha K. Still M1. Still the same member. The name changed, the identity did not.
Now two amounts. Each is 100 rupees. Same amount? Yes. A value has no identity. It is just its fields.
An entity has an id. Edit it, and it's still the same one. A value object is its fields. Add 50, and you get a new amount.
Compare members by name, and you merge two people into one. Edit a shared amount in place, and everyone holding it changes. So freeze values, and compare entities by id. That removes a whole class of bugs.
Ask one question about any object. What makes two of them the same? An id? Then it's an entity. The values? Then it's a value object.
Full breakdown in the lecture.