     @return [Object] The class to build the Id Value with
 
   ###
-  getDefaultIdType: () =>
+  getDefaultIdType: () ->
     return String
 
   ###


    @return [Object] The collection name for this model
  ###
  getCollectionName: (model) =>
    if @getModelClass(model).settings.options?.arangodb?
      model = @getModelClass(model).settings.options?.arangodb?.collection or model

    return model


    @param id [String] id The id value
    @param callback [Function] The callback function, called with a (possible) error object and the found object
  ###
  find: (model, id, callback) ->
    debug "find for #{model} with id: #{id}" if @debug

    aql = qb.for('doc').in('@@collection').filter(qb.eq('doc._key', '@id')).limit(1).return(qb.fn('UNSET') 'doc', ['"_id"','"_rev"'])

    bindVars =
      '@collection': @getCollectionName model
      id: id

    @execute aql, bindVars, (err, result) ->
      return callback err if err
      return callback null, result._result[0] if result._result.length > 0
      callback null, result._result


  ###
   Decide if id should be included
   @param {Object} fields
   @returns {Boolean}
   @private
  ###
  _idIncluded: (fields, idName) ->
    if !fields then return true

    if Array.isArray(fields)
      return fields.indexOf(idName) >= 0

    if fields[idName]
      # Included
      return true

    if idName in fields and !fields[idName]
      # Excluded
      return false

    for f in fields
      return !fields[f]; # If the fields has exclusion

    return true


  # ========================
  # = Collection functions =
