I have a model that keeps erroring out after the first POST. I\'m creating a scheduling application, which is X number of days, with rooms, and time slots for the rooms.
<
I think You had model for days
collection with date
attribute which had unique index date_1
.
Now You've removed it but collection still has that index.
so that's why it says:
duplicate key error collection: .days index: date_1 dup key: { : null }
it means You're inserting another record where date
attribute is also null.
log in to mongodb from console and try to do this:
db.collectionNameHere.getIndexes();
db.collectionNameHere.dropIndex('date_1');
db.collectionNameHere.getIndexes();
p.s. feel free to provide any additional data in Your question or in comments, to help me/us to solve Your issue.