 
   Utils.configureModelType(type) # mixin extensions
   return BackboneORM.model_cache.configureSync(type, sync_fn)
+
+module.exports.capabilities = CAPABILITIES

  ###################################
  # Backbone ORM - Class Extensions
  ###################################
  # @private
  resetSchema: (options, callback) -> @http('delete', null, {}, callback)
  cursor: (query={}) -> return new HTTPCursor(query, {model_type: @model_type, sync: @})
  destroy: (query, callback) ->
    [query, callback] = [{}, query] if arguments.length is 1
    @http('delete', null, {query: query}, callback)

  http: (method, model, options, callback) ->
    url = if model then _.result(model, 'url') else @url
    if options.query and _.size(options.query)

HTTPCursor = require './cursor'
URL = require 'url'

CAPABILITIES = {self_reference: true, embed: true}

class HTTPSync

  constructor: (@model_type, options={}) ->
    @model_type.model_name = Utils.findOrGenerateModelName(@model_type)
    throw new Error("Missing url for model: #{@model_type}") unless @url = _.result(new @model_type, 'url')
    @schema = new Schema(@model_type, {id: {type: '_raw'}})

    @beforeSend = options.beforeSend
    @event_emitter = _.extend({}, Backbone.Events)

  # @no_doc
  initialize: (model) ->
    return if @is_initialized; @is_initialized = true
    @schema.initialize()
