         # TODO(aramk) Disabling validation is dangerous - only done here to avoid validation
         # errors which don't have messages at the moment. Improve collection2 to provide the
         # message returned from the validate method.
-        collection.direct.insert model, (err, result) ->
+        method = collection.direct.insert if args.useDirect
+        method ?= collection.insert
+        method.call collection, model, (err, result) ->
           if err
             createDf.reject(err)
           else

    allCreatePromise.then Meteor.bindEnvironment ->
      _.each idMaps, (idMap, name) ->
        collection = collectionMap[name]
        _.each idMap, (newId, oldId) ->
          newModel = collection.findOne(newId)
          modifier = SchemaUtils.getRefModifier(newModel, collection, idMaps)
          if Object.keys(modifier.$set).length > 0
            refDf = Q.defer()
            refDfs.push(refDf.promise)
            collection.direct.update newId, modifier, (err, result) ->
              if err
                refDf.reject(err)
              else

  # @param {Object} json - The serialized JSON. This object may be modified by this method - pass a
  #     clone if this is undesirable.
  # @param {Object} args
  # @param {Boolean} [args.useDirect=true] - Whether collection methods should be invoked directly
  #     and bypass any validation or collection hooks.
  # @returns {Promise.<Object.<String, Object>>} A promise to return a map of collection names to
  #     maps of old IDs to new IDs for the models in that collection.
  fromJson: (json, args) ->
    Logger.info('Creating project from JSON...')
    args = Setter.defaults args, {useDirect: true}

    # Construct all models as new documents in the first pass, mapping old ID references to new IDs.
    # In the second pass, change all IDs to the new ones to maintain references in the new models.
