つまり、ドメイン モデルを作成以外で変更できるようにする必要がある場合はありますか?
2 に答える
通常、値オブジェクトは不変です。一方、エンティティは不変である必要はありません。たとえば、ドメインに Order エンティティを含めることができ、品目の追加や配送先住所の変更が許可されます。
Unlike Dmity's answer, I am assuming that you mean the design of the model as a whole, not the individual entities at runtime.
The answer to this is yes. In fact it this is the whole point of domain modeling. The business model will change over time (this is inevitable - business must adapt to survive) and the model must evolve to match it. Domain modeling combined with agile development techniques takes this into consideration. The trick is to design your domain model so that it can evolve.