Open
Description
I have installed
"mongoose": "^5.11.12",
"mongoose-sequence": "^5.3.1",
and use mongoose-sequence in mongoose Model file as below
const mongoose = require("mongoose");
const AutoIncrement = require('mongoose-sequence')(mongoose);
const AlbumSchema = new mongoose.Schema({
userId: {
type: Number,
},
title: {
type: Object
},
genre: {
type: Array
},
artists: {
type: Array,
},
composers: {
type: Array
},
releaseDate: {
type: String
}
});
AlbumSchema.plugin(AutoIncrement, {inc_field: 'albumId'});
module.exports = mongoose.model('Album', AlbumSchema);
When I run Album.create(data) in controller I am getting this error
Metadata
Metadata
Assignees
Labels
No labels