parent-child - CQRS: How to correct missing events from the past
问题描述
In our application that uses CQRS and eventsourcing we have comments and replies. In the past if we deleted the comment we didn't delete the replies. Now we want to make sure the replies are also deleted.
How best to solve this:
- Create a list of replies that should have been deleted from the eventsource
table
and delete them after the comment was deleted. - Create a new
deletedCommentEvent
that has a new property "HasDeletedReplies" and handle both events differently so this takes into account if the replies have been deleted yes/no.
解决方案
推荐阅读
- javascript - 正则表达式将 JSON 转换为忽略香草 javascript 中的空格的块数组
- json - 从文件中读取原始字节数据并将其解码为 protobuf 结构
- xamarin.forms - 在 Android Xamarin 表单上禁用自动位置权限
- r - 对于嵌套循环在 R 中的小标题列表中执行缓慢
- python - 如何在 Python 中处理非地理多边形矢量数据?
- rest - CF 管理员中的 REST 设置
- openmp - 我用 C 语言编写了一个用于求解 3D 拉普拉斯方程的 openMP 代码,但它在 HPC 集群上没有显示出良好的性能
- python - 将数据框标题设为行,将行设为标题
- python - 如何在 Python Pandas 中对同一数据框中的两列执行操作?
- reactjs - 重定向未登录的访客