Reputation: 104
I have the following requirements:
Well, in this situation, you would create an aggregate for article, other for question and other for answer.
If yes, how to keep the invariant that an article have between 1 and 3 questions?
If no, how would you model it?
Thanks a lot!
Upvotes: 0
Views: 35
Reputation: 20551
Since an aggregate defines a consistency boundary, publishing an article is a saga. Adding a question is likewise going to be a saga if you want the Question to track which Article(s) it's associated with (you didn't directly say that Question maintains an invariant that it's only ever associated with one article).
Upvotes: 1