I just added SimpleSchema to my project and tried to create a Collection like this:
const MyCollection = new Mongo.Collection('MyCollection');
,
but when I used a find()
command to check what it was inserted (using upsert), the field _id was on the format ObjectId(xxxxxxxxxx)
instead of a single String like before.
How can I get a simple String on it? I tried to use Meteor’s recommendations and changed my declaration to
const MyCollection = new Mongo.Collection('MyCollection', { idGeneration: 'STRING' });
but nothing happens…