fix(command): correct aggregate ID assignment of groups (#11725)

# Which Problems Are Solved

The group write model used the `event.ID` field instead of
`event.Aggregate().ID` as aggregate id.

# How the Problems Are Solved

replaced `event.ID` with `event.Aggregate().ID`
This commit is contained in:
Silvan
2026-03-02 09:57:26 +01:00
committed by GitHub
parent 110a082fc2
commit d3434dd46c
+1 -1
View File
@@ -59,7 +59,7 @@ func (g *GroupWriteModel) Reduce() error {
for _, event := range g.Events {
switch e := event.(type) {
case *group.GroupAddedEvent:
g.AggregateID = e.ID
g.AggregateID = e.Aggregate().ID
g.Name = e.Name
g.Description = e.Description
g.State = domain.GroupStateActive