title: MongooseError [ParallelSaveError]: Can't save() the same doc multiple times in parallel
body: <p>I am having an issue with mongoose and nodejs. May be i am writing wrong code or any other problem please help. Here is my controller file. <code>alldata.save</code> gives <code>[ParallelSaveError]</code> </p>
  
  <pre><code>let createData = async function(req,res,next) {
      let body = req.body;
      let alldata = new League(body);
      let start_time = new Date().getTime();
      try {
           await Leaguecategories.find({})
                  .then(async function(categories) {  
                      categories.forEach(async function(category) {
                        //here i am assigning foreign key
                          alldata.league_category_id = category._id;
                         await alldata.save(function(err, book){
                              if(err){
                                  console.log(err);
                              }else{
                              res.send({status: 0, statusCode:"success", message: "Successfully inserted."})
                              }
                         });
                      })     
                  })
      }
      catch (error){
          return res.send({status : 1 , statusCode : "error" , message : error.message})
      }
  }
  </code></pre>
  
  <p>Here is my Leaguecategories model</p>
  
  <pre><code>var mongoose = require('mongoose');
  
  
  const league_categories = new mongoose.Schema({
      name: {
        type: String,
        required: true
      },
      active: {
        type: String,
        required: true
      },
      create_date: {
        type: Date,
        required: true,
        default: Date.now
      },
      league_type_id: {
        type: String,
        required: 'league_type',
        required:true
      }
    })
  
    module.exports = mongoose.model('Leaguecategories', league_categories)
  </code></pre>
  
  <p>Here is my League model</p>
  
  <pre><code>var mongoose = require('mongoose');
  
      const league = new mongoose.Schema({
          title: {
              type: String,
              required: true
            },
            pool_price: {
                type: Number,
                required: true
            },
            entry_fee: {
                type: Number,
                required: true
            },
            total_spots: {
                type: Number,
                required: true
            },
            start_time: {
              type: Date,
              required: true
            },
            end_time: {
              type: Date,
              required: true
            },
            create_date: {
              type: Date,
              required: true,
              default: Date.now
            },
            active: {
              type: String,
              required: true
            },
            league_category_id: {
              type: String,
              ref: 'Leaguecategories',
              required:true
            }
      })
  
      module.exports = mongoose.model('League', league)
  </code></pre>