   unless @[id_param]()?
     console.error 'Tried to access empty relation key: ' + id_param
     return false
+
+  if typeof @[id_param]() == 'function'
+    console.error 'Circular referene? Quitting.'
+    return false
   
   unless callback?
     callback = (data) =>
       @[name] model(data)
   
-  model.getOne @[id_param](), callback
+  model.get_one @[id_param](), callback
 
-create_fn = (id_param, api_name, name, model, options) ->
+create_fn = (id_param, api_name, name, model, connector, options) ->
   (params = {}, callback, instant = false) =>
     unless callback?
       callback = (data) =>

    if model.encrypted_container?
      params = model.encrypt_container(params)

    if options.belongs_to?
      @.api()[api_name].update(options.belongs_to, @.id, id, params).done callback
    else
      @.api()[api_name].update(@.id, id, params).done callback

    if @.after_update?
      @.after_update()

destroy_fn = (id_param, api_name, name, model, options) ->
  (id, callback) =>
    unless callback?
      callback = (data) =>


      callback = callbackOrObservable

    api = connector.get api_name

    unless api?
      console.error 'No Connector found for resource "' + api_name + '" found: ', api
      return false

    if options.belongs_to?
      api.read(options.belongs_to, @.id, params).done callback
    else
      api.read(@.id, params).done callback

single_get_fn = (id_param, api_name, name, model, connector, options = {}) ->
  (params = {}, callbackOrObservable) =>
    callback = (data) =>
      @[name] model(data)
