Open Able1991 opened 2 years ago
Hello there. Not work implementation from examples with MUUID.from(this._id).toString(); this._id - is mongo lib object Now if fix with
MUUID.from(this._id).toString();
_id: { type: Buffer, subtype: 4, default: () => MUUID.v1(), }, .... // virtual getter for custom _id schema .virtual("id") .get(function () { return MUUID.from(this._id.toBSON()).toString(); }) .set(function (val) { this._id = MUUID.from(val); });
Is this a normal solution, or is it necessary to do something else?
Hey how did you fix this!!
Hello there. Not work implementation from examples with
MUUID.from(this._id).toString();
this._id - is mongo lib object Now if fix withIs this a normal solution, or is it necessary to do something else?