Skip to content

Commit

Permalink
improve aggregate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBadura committed Feb 1, 2024
1 parent 43f8f1f commit 60d14c9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/pages/aggregate.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Aggregate

The linchpin of event-sourcing is the aggregate. These aggregates can be imagined like entities in ORM.
One main difference is that we don't save the current state, but only the individual events that led to the state.
This means it is always possible to build the state again from the events.
One main difference is that we don't save the current state, but only the individual events that led to the state.
This means it is always possible to build the current state again from the events.

!!! note

Expand Down Expand Up @@ -115,6 +115,7 @@ final class ProfileRegistered
!!! note

You can find out more about events [here](./events.md).
And for normalizer [here](./normalizer.md).

After we have defined the event, we have to adapt the profile aggregate:

Expand Down Expand Up @@ -270,6 +271,10 @@ final class ChangeNameHandler
}
```

!!! success

Our aggregate can now be changed and saved.

!!! note

You can read more about Repository [here](./repository.md).
Expand Down

0 comments on commit 60d14c9

Please sign in to comment.