Use scope and collection in transaction in findByQuery.count(). (#1868)

Closes #1862.
This commit is contained in:
Michael Reiche
2023-11-17 16:09:31 -08:00
committed by mikereiche
parent 4ce7f1bf2a
commit 0e985d212e

View File

@@ -256,8 +256,9 @@ public class ReactiveFindByQueryOperationSupport implements ReactiveFindByQueryO
: rs.query(statement, opts);
} else {
TransactionQueryOptions opts = buildTransactionOptions(pArgs.getOptions());
return (AttemptContextReactiveAccessor.createReactiveTransactionAttemptContext(s.get().getCore(),
clientFactory.getCluster().environment().jsonSerializer())).query(statement, opts);
JsonSerializer jSer = clientFactory.getCluster().environment().jsonSerializer();
return AttemptContextReactiveAccessor.createReactiveTransactionAttemptContext(s.get().getCore(), jSer)
.query(OptionsBuilder.queryContext(pArgs.getScope(), pArgs.getCollection(), rs.bucketName()) == null ? null : rs, statement, opts);
}
});