Also support the new "projection" field inside the decision of using oplog for a published cursor or not

This commit is contained in:
Renan Castro
2022-02-10 17:17:13 -03:00
parent 8223359af2
commit 25f8facb49

View File

@@ -984,9 +984,10 @@ OplogObserveDriver.cursorSupported = function (cursorDescription, matcher) {
// If a fields projection option is given check if it is supported by
// minimongo (some operators are not supported).
if (options.fields) {
const fields = options.fields || options.projection;
if (fields) {
try {
LocalCollection._checkSupportedProjection(options.fields);
LocalCollection._checkSupportedProjection(fields);
} catch (e) {
if (e.name === "MinimongoError") {
return false;