You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you please post more code, from the schema definition to the prt where you save the document? A minimal replicable code maybe.
There's a test in the library that shows this and I just checked and it works. Also, in your issue the error reported is Cast to number failed for value " {name : Michael} " at path _id for model Hotel but the schema seems related to Users, not Hotels.
I followed your guide to do this
UserSchema = mongoose.Schema({
_id: Number,
name: String
}, { _id: false });
UserSchema.plugin(AutoIncrement);
But I keep getting error that "Cast to number failed for value " {name : Michael} " at path _id for model Hotel
The text was updated successfully, but these errors were encountered: