     @option settings port [Number] The port to connect with
     @option settings database/db [String] The database to connect with
     @option settings headers [Object] Object with header to include in every request
-  
+
     @param dataSource [DataSource] The data source instance
   ###
   constructor: (settings, dataSource) ->

          when key is '_id' then val.split('/')[0]
        delete data[key]
        continue
      
      # Buffer
      if properties[key]?.type is Buffer and val?
        data[key] = val.toString('base64')
      
      # Date
      if properties[key]?.type is Date and val?
        data[key] = new Date val

  getCollectionName: (model) =>
    if @getModelClass(model).settings.options?.arangodb?
      model = @getModelClass(model).settings.options?.arangodb?.collection or model

    return model


  ###
    Converts the retrieved data from the database to JSON, based on the properties of a given model

