Hmm… I don’t think so. We already have a mechanism for generating string IDs.
This seems to be a problem with the TypeScript typings for the mongodb driver.
await this.collection.updateOne({ _id: this.id }
worked before I upgraded.
After, I get a TypeScript error unless I cast all my IDs to any:
await this.collection.updateOne({ _id: this.id as any}
I can certainly go through all my code and cast all IDs to any, but my understanding was that string IDs are supported by MongoDB. If that’s the case, shouldn’t the typings for the driver accept strings?