for the sake of experiment:
-
async 'updateDoublesCustomFieldsAutoMerge'(ObjectIdDoublesGroupId, essenceId, customFieldId, customFieldValue){
const oid = new Mongo.ObjectID("5b60122d86e9c706c6fd8263");
return await DoublesCol.rawCollection()
.find({_id: oid}).count();
},
result: 0 ( https://yadi.sk/i/nlHP1-ci3ZmQhC )
-
async 'updateDoublesCustomFieldsAutoMerge'(ObjectIdDoublesGroupId, essenceId, customFieldId, customFieldValue){
return await DoublesCol.rawCollection()
.find().count();
},
result: 2335 ( https://yadi.sk/i/0kwofna43ZmQbC )
-
async 'updateDoublesCustomFieldsAutoMerge'(ObjectIdDoublesGroupId, essenceId, customFieldId, customFieldValue){
const oid = new Mongo.ObjectID("5b60122d86e9c706c6fd8263");
return await DoublesCol.rawCollection()
.find({'value': '79214019711'}).count();
},
Result: 1 ( https://yadi.sk/i/bx0JHFch3ZmRAr )
-
async 'updateDoublesCustomFieldsAutoMerge'(ObjectIdDoublesGroupId, essenceId, customFieldId, customFieldValue){
const oid = new Mongo.ObjectID("5b60122d86e9c706c6fd8263");
return DoublesCol
.find({'_id': oid}).count();
},
Result 1 ( https://yadi.sk/i/9gGxOlty3ZmRSn )
5
async 'updateDoublesCustomFieldsAutoMerge'(ObjectIdDoublesGroupId, essenceId, customFieldId, customFieldValue){
return await DoublesCol
.find({'_id': ObjectIdDoublesGroupId}).count();
},
Result 1 ( https://yadi.sk/i/X8WrIzco3ZmRpy )
TOTAL:
Experimentally, it was found that the rawCollection does not search for “Mongo.ObjectID”