title: What is the difference between use `clone` and `Object.assign` method to clone/extend a schema in mongoose?
body: <p>My purpose is that clone/extend a common schema with different collections, there are two ways to achieve my purpose, I would like to know the difference between these ways:</p>
  
  <pre><code>const extendSchema = (Schema, definition, options) =&gt;
    new MongooseSchema(Object.assign({}, Schema.obj, definition), options);
  
  const CommonSchema = new MongooseSchema({
    name: {
      type: String,
      unique: true,
    },
    logo: String,
    owner: {
      name: String,
      avatar: String,
      reference: {
        type: ObjectId,
        ref: 'User',
      },
    },
  });
  
  const AnthorSchema = extendSchema(CommonSchema, { periverImage: String });
  </code></pre>
  
  <p>And the second is:</p>
  
  <pre><code>const CommonSchema = new MongooseSchema({
    name: {
      type: String,
      unique: true,
    },
    logo: String,
    owner: {
      name: String,
      avatar: String,
      reference: {
        type: ObjectId,
        ref: 'User',
      },
    },
  });
  
  const AnthorSchema = CommonSchema.clone();
  AnthorSchema.add({ previewImage: String });
  </code></pre>