title: How to save/update object in collection and embed object in object?
body: <p>I have two collections Colors and Cars.
  In the car possibly to choose the color.</p>
  
  <p>How to save/update object in collection so that embed Color object in Car object?</p>
  
  <pre><code> Cars = new Mongo.Collection('cars');
      Cars.attachSchema(new SimpleSchema({
          colorId: {
              label: 'Color',
              type: String,
              autoform: {
                  options: function () {
                      return Colors.find().map(function (p) {
                          return {label: p.colorName, value: p._id};
                      });
                  },
                  label: false
              }
          },
  
          color: {
              type: Object,
          },
          'color._id': {
              type: String,
              autoform: {
                  omit: true,
              },
          },
          'color.colorName': {
              type: String,
              autoform: {
                  omit: true,
              },
          },
          'color.colorCode': {
              type: String,
              autoform: {
                  omit: true,
              },
          },
      }));
  
  
  Colors = new Mongo.Collection('colors');
  Colors.attachSchema(new SimpleSchema({
      colorName: {
          type: String,
          label: "Color Name",
          max: 20,
      },
      colorCode: {
          type: String,
          optional: true,
          label: "Color Code",
          autoform: {
              afFieldInput: {
                  type: "color"
              }
          }
      },
  }));
  </code></pre>
  
  <p>I try use 
  AutoForm.hooks({ insertCarForm: {before: {</p>
  
  <p>but it did not work</p>