diff --git a/Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php b/Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php index 05aebff..b85b12d 100644 --- a/Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php +++ b/Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php @@ -85,7 +85,8 @@ public function load(StreamName $streamName, int $minimumSequenceNumber = 0): Ev $this->reconnectDatabaseConnection(); $query = $this->connection->createQueryBuilder() ->select('*') - ->from($this->eventTableName); + ->from($this->eventTableName) + ->orderBy('sequencenumber', 'ASC'); if (!$streamName->isVirtualStream()) { $query->andWhere('stream = :streamName');