Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed counters findandmodify to upsert

  • Loading branch information...
commit 06a16394af3f0426c41b419c59eeeaaefe3d23a6 1 parent b36253e
@tyronegroves tyronegroves authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/NEventStore.Persistence.MongoDB/MongoPersistenceEngine.cs
View
4 src/NEventStore.Persistence.MongoDB/MongoPersistenceEngine.cs
@@ -49,9 +49,9 @@ public MongoPersistenceEngine(MongoDatabase store, IDocumentSerializer serialize
_getNextCheckpointNumber = () => TryMongo(() =>
{
- IMongoQuery query = Query.And(Query.EQ("_id", "CheckpointNumber"));
+ IMongoQuery query = Query.EQ("_id", "CheckpointNumber");
IMongoUpdate update = Update.Inc("seq", 1);
- FindAndModifyResult result = Counters.FindAndModify(query, null, update, true);
+ FindAndModifyResult result = Counters.FindAndModify(query, null, update, true, true);
return result.ModifiedDocument["seq"].ToInt32();
});
}

0 comments on commit 06a1639

Please sign in to comment.
Something went wrong with that request. Please try again.