daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. POST:
  2. { title: 'My Awesome T-shirt 2',
  3.   description: 'All about the details. Of course it's black.',
  4.   style: '12345' }
  5. { [MongoError: E11000 duplicate key error index: ecomm_database.products.$style_1  dup key: { : "12345" }]
  6.   name: 'MongoError',
  7.   err: 'E11000 duplicate key error index: ecomm_database.products.$style_1  dup key: { : "12345" }',
  8.    
  9. var Product = new Schema({  
  10.     title: { type: String, required: true },  
  11.     description: { type: String, required: true },  
  12.     style: { type: String, unique: true },  
  13.     modified: { type: Date, default: Date.now } });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top