Updating Order not stored in MongoDB
Closed this issue · 2 comments
Hi,
I am trying to use your example as a basis for a new project. As I understand to MongoRepo should store the current Orderstate of an order. But looking into MongoDB after submitting the same order with different customerNumber I can't see the new cardNumber in MongoDB. Only the version is incremented.
Have I change something in configuration to solvee this?
Any help is appreciated.
Regards Gerd
Subsequent order submissions are ignored, you'd need to accept that event in this state to update the card number, but at that point the order is already being processed. Now, if the order had faulted and was in a faulted state, you could accept the submission again with a new card number and reprocess the routing slip.
THX.
It was my fault not to look to the '??=' operator in OrderSubmitted.