I want to create a little GPS tracking program. Simplified: Users can create Tracks. To make things scale Track and User are two separate AR's. Track contains an AuthorUser which it refers to by UserID.
The following rules apply:
A User can create an unlimited amount of Tracks.
Users can be removed from the system. In that case all the created Tracks of the User need to be removed.
I want to use DDD+ES for this. Knowing the AR's can only be created/loaded by ID, how should I delete/modify all Tracks when a UserRemovedEvent is triggered?
Please note the query model is completely decoupled and might lag in time since it is async event-based updated.