 
     return module.exports.apply(null, Array::slice.call(arguments, 1)) if method is 'createSync' # create a new sync
     return sync if method is 'sync'
+    return sync.schema if method is 'schema'
 
     ###################################
     # Classic Backbone Sync

        return callback(new Error "Ajax failed with status #{res.status} for #{'destroy'} with: #{util.inspect(res.body)}") unless res.ok
        callback(null, res.body)

  schema: (key) -> @model_type._schema
  relation: (key) -> @model_type._schema.relation(key)


module.exports = (model_type, cache) ->
  sync = new AjaxSync(model_type)

    # publish methods and sync on model
    @model_type.model_name = Utils.parseUrl(@url).model_name unless @model_type.model_name # model_name can be manually set
    throw new Error('Missing model_name for model') unless @model_type.model_name
    @schema = new Schema(@model_type)
    @request = require 'superagent'

    ###################################
