Closed qvjp closed 6 years ago
mongo error: MongoError: Unknown modifier: $pushAll.
You can add one line to app/models/room.js to solve this problem.
var RoomSchema = new mongoose.Schema({ slug: { type: String, required: true, trim: true, lowercase: true, unique: true, match: /^[a-z0-9_-]+$/i }, archived: { type: Boolean, default: false }, name: { type: String, required: true, trim: true }, description: { type: String, trim: true }, owner: { type: ObjectId, ref: 'User', required: true }, participants: [{ // We can have an array per role type: ObjectId, ref: 'User' }], messages: [{ type: ObjectId, ref: 'Message' }], created: { type: Date, default: Date.now }, lastActive: { type: Date, default: Date.now }, private: { type: Boolean, default: false }, password: { type: String, required: false//only for password-protected room } },{ usePushEach: true // *****Here***** });
mongo error: MongoError: Unknown modifier: $pushAll.
You can add one line to app/models/room.js to solve this problem.