Bypassing Aggregate Root

前端 未结 2 1044
广开言路
广开言路 2021-01-15 13:34

Is it okay to get a read-only collection from an aggregate without going through the root to get it? My model does some of this right now and I was wondering if that\'s an a

2条回答
  •  长情又很酷
    2021-01-15 13:45

    Actually Eric has changed his mind about the strictness of the Aggregate Root Rules.
    He recently said something along the lines of

    "Chill out dude. Try to stop yourself from breaking the rules man. But, hey, don't beat yourself up over it. DDD rocks dude, but break the Agg rules if ya really need to. Yeah, peace."

    See: "Eric Evans: What I've learned about DDD since the book" http://ffffdcommunity.org/library/evans_2009_1

提交回复
热议问题