 
     if not (model instanceof Backbone.Model)
       attrs = model
-      Model = @modelTypes[attrs.type] or @model
+      Model = @classMap[attrs.type] or @model
       model = new Model attrs,
         collection: this
       if model.validate and not model._performValidation(attrs, options)

      throw new Error "SharedCollection needs a collectionId in options!"

    super

  handleError: (model) => (err) =>
    if err

    S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4()

  constructor: (models, opts={}) ->
    @classMap = {}
    @mapTypes opts.modelClasses if opts.modelClasses

    if opts.sharejsDoc
      @_syncDoc = opts.sharejsDoc

