diff --git a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore.cs b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore.cs index 2a63cc9eb..092087016 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore.cs @@ -62,12 +62,12 @@ namespace Squidex.Infrastructure.EventSourcing .Ascending(x => x.Timestamp)), new CreateIndexModel( Index - .Ascending(x => x.EventStream) - .Ascending(x => x.Timestamp)), + .Ascending(x => x.Timestamp) + .Ascending(x => x.EventStream)), new CreateIndexModel( Index - .Ascending(x => x.EventStream) - .Descending(x => x.Timestamp)), + .Descending(x => x.Timestamp) + .Ascending(x => x.EventStream)), new CreateIndexModel( Index .Ascending(x => x.EventStream) @@ -84,4 +84,4 @@ namespace Squidex.Infrastructure.EventSourcing CanUseChangeStreams = clustered && clusterVersion >= new Version("4.0"); } } -} \ No newline at end of file +} diff --git a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Reader.cs b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Reader.cs index 3dbd2605e..8f7c33029 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Reader.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Reader.cs @@ -117,7 +117,7 @@ namespace Squidex.Infrastructure.EventSourcing var find = Collection.Find(filterDefinition, options: Batching.Options) - .Limit((int)take).Sort(Sort.Descending(TimestampField)); + .Limit((int)take).Sort(Sort.Descending(TimestampField).Ascending(EventStreamField)); var taken = 0; @@ -157,7 +157,7 @@ namespace Squidex.Infrastructure.EventSourcing var find = Collection.Find(filterDefinition) - .Limit((int)take).Sort(Sort.Ascending(TimestampField)); + .Limit((int)take).Sort(Sort.Ascending(TimestampField).Ascending(EventStreamField)); var taken = 0; @@ -201,4 +201,4 @@ namespace Squidex.Infrastructure.EventSourcing return byPosition; } } -} \ No newline at end of file +} diff --git a/frontend/app/features/content/pages/content/content-history-page.component.html b/frontend/app/features/content/pages/content/content-history-page.component.html index 2262c8381..9739d4c03 100644 --- a/frontend/app/features/content/pages/content/content-history-page.component.html +++ b/frontend/app/features/content/pages/content/content-history-page.component.html @@ -117,7 +117,7 @@ - + {{ 'contents.lastUpdatedLabel' | sqxTranslate }}: {{content.lastModified | sqxFromNow}}