mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-12 05:35:31 +00:00
bug4882: Changed replaceOne() to updateOne() in MongoObjectFactoryImpl.renameEvent() and .renameLeaderBoardGroup
This commit is contained in:
1 parent
43550d1569
commit
c7ab12bb29
1 file changed
+2
-2
+2
-2
@@ -549,7 +549,7 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
MongoCollection<Document> leaderboardGroupCollection = database.getCollection(CollectionNames.LEADERBOARD_GROUPS.name());
|
||||
Document query = new Document(FieldNames.LEADERBOARD_GROUP_NAME.name(), oldName);
|
||||
Document update = new Document("$set", new Document(FieldNames.LEADERBOARD_GROUP_NAME.name(), newName));
|
||||
leaderboardGroupCollection.withWriteConcern(WriteConcern.ACKNOWLEDGED).replaceOne(query, update, new UpdateOptions().upsert(true));
|
||||
leaderboardGroupCollection.withWriteConcern(WriteConcern.ACKNOWLEDGED).updateOne(query, update, new UpdateOptions().upsert(true));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -647,7 +647,7 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
MongoCollection<Document> eventCollection = database.getCollection(CollectionNames.EVENTS.name());
|
||||
Document query = new Document(FieldNames.EVENT_ID.name(), id);
|
||||
Document renameUpdate = new Document("$set", new Document(FieldNames.EVENT_NAME.name(), newName));
|
||||
eventCollection.withWriteConcern(WriteConcern.ACKNOWLEDGED).replaceOne(query, renameUpdate, new UpdateOptions().upsert(true));
|
||||
eventCollection.withWriteConcern(WriteConcern.ACKNOWLEDGED).updateOne(query, renameUpdate, new UpdateOptions().upsert(true));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user