Create Many Records with model.create() - ahh

Don’t work anyway…

Please, help me!

Hey,

Where are your exports and MONGO_URI variable?

//----- **DO NOT EDIT BELOW THIS LINE** ----------------------------------

exports.PersonModel = Person;
exports.createAndSavePerson = createAndSavePerson;
exports.findPeopleByName = findPeopleByName;
exports.findOneByFood = findOneByFood;
exports.findPersonById = findPersonById;
exports.findEditThenSave = findEditThenSave;
exports.findAndUpdate = findAndUpdate;
exports.createManyPeople = createManyPeople;
exports.removeById = removeById;
exports.removeManyPeople = removeManyPeople;
exports.queryChain = queryChain;

I’m sorry. It’s wrong.

the mistake is this: “Creating many db items at once should succeed (Test timed out)”

You’re missing required key for name in your schema too

// - Person Prototype -
// --------------------
// name : string [required]
// age : number
// favoriteFoods : array of strings (*)

thank you very much, it worked

1 Like