diff --git a/server/models/song.js b/server/models/song.js index c4f372a5..5319be34 100644 --- a/server/models/song.js +++ b/server/models/song.js @@ -11,7 +11,7 @@ const SongSchema = new Schema({ type: Schema.Types.ObjectId, ref: 'lyric' }] -}); +}, { usePushEach: true }); SongSchema.statics.addLyric = function(id, content) { const Lyric = mongoose.model('lyric');