Add transaction to AggregateInput and CountInput

This commit is contained in:
2025-05-23 11:04:29 -05:00
parent ed91d3fdbe
commit 18232d5e80
6 changed files with 106 additions and 5 deletions

View File

@ -84,7 +84,7 @@ public class MongoDBAggregateAction extends AbstractMongoDBAction implements Agg
String backendTableName = getBackendTableName(table);
MongoDBBackendMetaData backend = (MongoDBBackendMetaData) aggregateInput.getBackend();
mongoClientContainer = openClient(backend, null); // todo - aggregate input has no transaction!?
mongoClientContainer = openClient(backend, aggregateInput.getTransaction());
MongoDatabase database = mongoClientContainer.getMongoClient().getDatabase(backend.getDatabaseName());
MongoCollection<Document> collection = database.getCollection(backendTableName);

View File

@ -72,7 +72,7 @@ public class MongoDBCountAction extends AbstractMongoDBAction implements CountIn
String backendTableName = getBackendTableName(table);
MongoDBBackendMetaData backend = (MongoDBBackendMetaData) countInput.getBackend();
mongoClientContainer = openClient(backend, null); // todo - count input has no transaction!?
mongoClientContainer = openClient(backend, countInput.getTransaction());
MongoDatabase database = mongoClientContainer.getMongoClient().getDatabase(backend.getDatabaseName());
MongoCollection<Document> collection = database.getCollection(backendTableName);