           Resource.remove {_id: resource._id, systemId: systemId}, callback
         else
           callback null
-  
+
   find: find
   findById: findById
   findOne: findOne

        max = 10000

      if options.sort?
        sort = options.sort
      else
        sort = {}


    query[key] = value

    @findOne query, callback

  findById = (id, systemId, callback) ->
    @findOneBy '_id', id, systemId, callback

