title: mongoose: How to insert a single subdocument - not an array
body: <p>In mongoose you are able to declare a schema for a subdocument as per:</p>
  
  <pre><code>        var childSchema = new mongoose.Schema({ name: String, age: String });
          var parentSchema = new mongoose.Schema({
              children: [childSchema]
          });
          var Parent = mongoose.model('Parent', parentSchema);
          var Child = mongoose.model('Child', childSchema);
  
          var child = new Child({name:'Joe', age: '21'});
          var parent = new Parent();
  
          parent.children = [child];
  
          parent.save(function(err, saved) {
              if(err) console.error(err);
          });
  </code></pre>
  
  <p>Seems the subdocument type needs to be an array. I need to be able to save the subdocument as a single instance, not an array ie:</p>
  
  <pre><code>        var childSchema = new mongoose.Schema({ name: String, age: String });
          var parentSchema = new mongoose.Schema({
              children: childSchema // not an array
          });
          var Parent = mongoose.model('Parent', parentSchema);
          var Child = mongoose.model('Child', childSchema);
  
          var child = new Child({name:'Joe', age: '21'});
          var parent = new Parent();
  
          parent.children = child; // not an array
  
          parent.save(function(err, saved) {
              if(err) console.error(err);
          });
  </code></pre>
  
  <p>So not an array or a ref, just a single instance subdocument. Is this possible? If not should I use:</p>
  
  <pre><code>var childInstance = child.toObject();
  </code></pre>