docs: function (model, options, callback) {
                  var schema = model.schema,
                      subModels = [],
                      type,
                      subCollection,
                      subModel,
                      addSubModel = function (model) {
                          subModels.push(model);
                      };
  
                  for (var reference in schema) {
                      if (schema.hasOwnProperty(reference)) {
                          type = schema[reference];
                          if (type.classof) {
                              // TODO: remove $nestedModels and use options to specify, which subModels should also be saved
                              // This depends on the changes of the model.
                              // If the submodels haven't changed, than there is no need to save sub models/collections.
                              if (type.classof(Model)) {
                                  subModel = model.$[reference];
                                  if (subModel && _.include(model.$nestedModels, reference)) {
                                      subModels.push(subModel);
                                  }
                              } else if (type.classof(Collection)) {
                                  subCollection = model.$[reference];
                                  if (subCollection) {
                                      subCollection.each(addSubModel);
                                  }
                              }
                          }
  
                      }
                  }
  
                  flow()
                      .parEach(subModels, function (model, cb) {
                          model.save(options, cb);
                      })
                      .exec(callback);
              }