 
 _ = require 'underscore'
 _.str = require 'underscore.string'
-
 
 #
 # Private methods

    error = validateType(req.db, req.params.type)
    if error
        return res.json(500, {error: error})
    type = _.str.classify req.params.type

    {query, options} = parseQuery(req.query)

            return res.json(500, {error: e})
        obj.save (err, obj, infos) ->
            if err
                console.log('yyy', err)
                return res.json(500, {error: err})
            return res.json({object: obj.toJSONObject({dereference: true}), infos: infos})

