Closing comments
There are a few final comments that I wanted to make about the code that we refactored in this chapter. I feel that these things needed a little further explanation, so you're not left scratching your head.
The first thing that I wanted to comment on is the fact that I did not do the single-entity lookup inside the read model even though this is technically a lookup operation. I felt that the single-entity lookup, by ID, should always return the most current state of that entity, and the read model won't guarantee this. It's always possible that the read model is slightly behind the write model due to the nature of how it's built. This was a judgment call that I made, going for being pragmatic versus being a purist.
The purist would say that all lookups go to the read model. The pragmatist in me however thought that single entity lookups should always give you the most up-to-date info, avoiding potential read model lag in these cases. This is a decision you can certainly change...