--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I wouldn't say the peasant is free. I would say that the unassignment as been recorded and the assignment has not yet been recorded.
I'm sure similar circumstances happen in non computing systems all the time. Yes, if the emperor asked each lord for a spot count, there could be 'missing peasants', but for each lord, the totals would balance perfectly.
Maybe I'm missing something...Why not create a second projection that is the cached representation of the information for that dashboard?
//Projection
Fealty: {
LordId : <lordId>,
PeasantCount : 0
}
Events:
PeasantDied { peasantId, lordId } - decrements counter for lord
PeasantSubjugated { peasantId, fromlordId, tolordid } decrements from lord, increments to lord
SELECT LordId, PeasantCount From Fealty
Why are Peasants ARs and not Value Objects? Why do they need identities in the kingdom other than to kill them?
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.