Although AggregateLifecycle#markDeleted served its purpose, we've seen people enter unexpected scenarios when using this functionality, as the aggregate could no longer be reached.
Furthermore, adding a simple boolean deleted to a model is, in most cases, sufficient.
Combining this with the @MessageHandlerInterceptor inside the model makes it so you can recreate the entire behavior of AggregateLifecycle#markDeleted without using "framework magic."
Although
AggregateLifecycle#markDeleted
served its purpose, we've seen people enter unexpected scenarios when using this functionality, as the aggregate could no longer be reached.Furthermore, adding a simple
boolean deleted
to a model is, in most cases, sufficient. Combining this with the@MessageHandlerInterceptor
inside the model makes it so you can recreate the entire behavior ofAggregateLifecycle#markDeleted
without using "framework magic."