Will string and Object ID still going to be supported on 3.0 Mongo functions?

In Meteor 2, I can pass document ids to Mongo functions, like find, directly, without specifying a full selector

const result = Collection.find(
  { _id: documentId }, // this is valid
);

const result = Collection.find(documentId); // This is also valid and gets me the same result

This is specified in Meteor 2ā€™s documentation:

However, this is not 100% clear in Meteor 3ā€™s documentation:

The parameter naming makes it look like Meteor 3 will only support full selectors, and will not support strings by themselves, but this is not explicitly written, so Iā€™m not sure what to expect.

Will Meteor 3ā€™s Mongo functions still support strings and Object IDs as input for the first parameter, or will they only support Mongo selectors now? Also, will it still be supported in the future?

Thanks!

1 Like