Re: Revenj - a DDD friendly framework
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
Hi Greg, thanks for questions. The tutorial: https://github.com/ngs-doo/revenj/blob/master/tutorials/revenj-tutorial-aggregate-events.md https://github.com/ngs-doo/revenj/blob/master/tutorials/revenj-tutorial-aggregate-events.md tries to explain that at the end. We are sharing sequence across several tables, so during DB insert they get ordered ID. You can see that in the submit_event-name function in the DB which gets created. And if I'm understanding your first question, the repository loads up an aggregate an all of it's events which needs to be applied to bring aggregate up-to-date. Of course, the nice things is this is done automatically by the repository provided from the model. Unprocessed events is a term we use for events which needs to be applied to an aggregate to reconstruct it fully. So when we decide to make another snapshot of an aggregate all "unprocessed" events are marked as processed and are not used anymore during reconstruction. Regards, Rikard