Skip to content

Commit

Permalink
Merge pull request #290 from nlx-sascha/patch-2
Browse files Browse the repository at this point in the history
Guaranty order of sequencenumber
  • Loading branch information
bwaidelich authored Apr 29, 2021
2 parents d2eef41 + dd3fa45 commit 61a13b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 61a13b7

Please sign in to comment.