Merge branch 'RED-9658' into 'main'

RED-9658: Fixed wrong database name

See merge request fforesight/mongo-database-commons!12
This commit is contained in:
Dominique Eifländer 2024-07-17 09:52:54 +02:00
commit 5993136356

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");
}