Skip to content

Commit 9e8734d

Browse files
committed
Fixed Count command
1 parent 6b15244 commit 9e8734d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mongodb/eventstore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func (s *EventStore) CountEventsFor(streamName goengine.StreamName, id string) (
163163
ctx, cancel := s.cs.CountEventsFor()
164164
defer cancel()
165165

166-
return s.mongoDB.Collection(string(streamName)).Count(ctx, bson.M{"aggregate_id": string(streamName)})
166+
return s.mongoDB.Collection(string(streamName)).CountDocuments(ctx, bson.M{"aggregate_id": string(streamName)})
167167
}
168168

169169
func (s *EventStore) createIndices(c *mongo.Collection) error {

0 commit comments

Comments
 (0)