RED-9658: Fixed wrong database name

This commit is contained in:
Dominique Eifländer 2024-07-17 09:49:47 +02:00
parent d4d84c6ac2
commit 59a9b2fef0

View File

@ -43,7 +43,7 @@ public class MongoClientCache {
var mongoDBConnection = mongoConnectionProvider.getMongoDBConnection(key);
if (mongoDBConnection != null) {
return new MongoClientConnection(key, buildMongoClient(mongoDBConnection));
return new MongoClientConnection(mongoDBConnection.getDatabase(), buildMongoClient(mongoDBConnection));
}
throw new RuntimeException("No Connection provided");
}