79838233

Date: 2025-12-04 18:18:49
Score: 3.5
Natty:
Report link

What about this alternative: in the aggregate constructor apply an extra event:

public GiftCard(IssueCardCommand cmd) {
    ... 
    apply(new CardIssuedEvent(...);
    apply(new CardRedeemedEvent(/*defaults*/);
}

This would avoid the replay issues and still work for both types of aggregates, wouldn't it?

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): What
  • Low reputation (1):
Posted by: Frido