   # assocation definition hash.
   _addAssociation: (name, model, type) ->
     @associations[name] = { model: model, associationType: type }
+  
+  setupAssociations: ->
 
   # indicates that a given attribute is actually a Collection. Adds the correct settings to
   # the association hash.

    @converters   = {}
    @derivations  = []
    
    # we NEED this so that Backbone.js is happy.
    super
    

    for attribute, value of attrs
      if association = @associations[attribute]
        attrs[attribute] = switch association.associationType
          when 'hasOne' then (new association.model(value))
          when 'hasMany' then (new association.model).reset(value)
      if converter = @converters[attribute]
        if _.isFunction(converter)
          attrs[attribute] = converter(value)
