Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- POST:
- { title: 'My Awesome T-shirt 2',
- description: 'All about the details. Of course it's black.',
- style: '12345' }
- { [MongoError: E11000 duplicate key error index: ecomm_database.products.$style_1 dup key: { : "12345" }]
- name: 'MongoError',
- err: 'E11000 duplicate key error index: ecomm_database.products.$style_1 dup key: { : "12345" }',
- var Product = new Schema({
- title: { type: String, required: true },
- description: { type: String, required: true },
- style: { type: String, unique: true },
- modified: { type: Date, default: Date.now } });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement