I want to create a new read model projection of my events in my CQRS/ES application.
The problem is that the key i need to use for my projection is not present in all my events :
My root aggregate is a Car.
First event is a CarCreated event holding the "manufacturer"
Then i shall have a CarRepaired event holding only a "date"
My new read projection is a CarsRepairedPerManufacturer which will count repaired cars for each manufacturer :
No problem for the CarCreated event : This event hold de "manufacturer" so my read view is created with the correct key
The problem is with my CarRepaired event : How can find the correct row in my read model (where the key is the manufacturer) when i don't have this information in my event ?
Maybe i am missing something here because if this was unsolvable it would limit the kind of projections you could do in ES/CQRS.