Open 4e1e0603 opened 3 years ago
David, thanks for the comment. What you say make definitely sense. I'm preparing version 2.0.2 of the book with some fixes, so I will definitely have a look at this. If it doesn't make it in 2.0.2 I will however use it in a future version as I agree that comparing IDs is the best strategy. Thanks!
If I understand it well, the
Room
domain model is what Domain-Driven Design (DDD) call Entity / Aggregate root entity, I think it would be better to compare rooms by id only because e.g. the price can change but the room is the same. At this moment the room is represented as a value object (DDD). I would model it like this:Is there some channel where this architectural decisions can be discussed?
All the best, David.