       for name, data of options.has_many
         Ham.merge data,
           model: name.capitalize()
-        
-        relation_params = relationship_fields name, data.model, options.connector, options
+
+        relation_params = relationship_fields name, data.model, self.api(), options
 
         # Get
         #
         if self[name + 's']?
           fn = window[data.model]
-          
+
           items = []
           for item in self[name + 's']
             items.push new fn(item)


        if m.after_create?
          m.after_create()
        
        callbackOrObservable(data)

    if params.length > 0 || typeof params == 'object'
      if model.encrypted_container?
        params = model.encrypt_container(params)
      
      connector.create(params).done callback
    else
      connector.create().done callback

  if options.encrypted_container?
    model.encrypted_container = options.encrypted_container

  if options.encrypted_editable?
    model.encrypted_editable = options.encrypted_editable

  # Debug function
  model.encrypt_container = (data, container) ->

  return model


module.exports = Modelize if module?
