     S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4()
 
   constructor: (models, opts={}) ->
-    @modelTypes = opts.modelTypes or {}
+    @classMap = {}
+    @mapTypes opts.modelClasses if opts.modelClasses
+
     if opts.sharejsDoc
       @_syncDoc = opts.sharejsDoc
 


    if not (model instanceof Backbone.Model)
      attrs = model
      Model = @modelTypes[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

  mapTypes: (modelClasses) ->
    for Model in modelClasses
      if not Model::type
        throw new Error "Model class #{ Model::constructor.name } is missing `type` attribute."
      @classMap[Model::type] = Model

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