title: Using transactions in mongoose throws an error
body: <p>Taking cue from <a href="https://stackoverflow.com/questions/51228059/mongo-db-4-0-transactions-with-mongoose-nodejs-express">this SO post</a>, I tried to implement MongoDB's new transactions feature using Mongoose 5.2.13. Here's my attempt:</p>
  
  <pre><code>addPost: async (parent, args) =&gt; {
    // Add new post to dbPosts
    const session = await dbPost.startSession();
    session.startTransaction();
    try {
      const opts = { session };
      const q1 = await dbPost({
        _id: new mongoose.Types.ObjectId(),
        title: args.title,
        content: args.content,
        author: {
          id: args.author_id,
          first_name: args.author_first_name,
          last_name: args.author_last_name,
        }
      }).save(opts);
      const q2 = await dbUser.findOneAndUpdate(
        {_id: args.author_id},
        {$push: {posts:
          {
            id: 'a14def', // need access to the _id field from q1
            title: args.title,
            content: args.content,
          }
        }},
      opts);
      await session.commitTransaction();
      session.endSession();
    } catch(err) {
      await session.abortTransaction();
      session.endSession();
      console.log('ERRORS:\n-----------\n' + err);
      console.log('\n------------\n\n');
      throw err;
    }
  }
  </code></pre>
  
  <p>Running the above code, however, is returning the following error:</p>
  
  <blockquote>
    <p>BSON field 'insert.autocommit' is an unknown field.</p>
  </blockquote>
  
  <p>What does it mean and what part of my code is causing it? Also, how do I access the <em>_id</em> generated by the first operation (<code>.save()</code> in this case) for use in the second operation (<code>.findOneAndUpdate()</code> in this case)? Currently, I am just hardwiring a dummy value there:</p>
  
  <pre><code>id: 'a14def'
  </code></pre>