 Document._Reference = class extends Document._Reference
-  updateSource: (id, fields) =>
+  _updateSource: (id, fields) =>
     selector = {}
     selector["#{ @sourcePath }._id"] = id
 


    @Meta.collection.find({}, fields: sourceFields).observeChanges
      added: (id, fields) =>
        @sourceUpdated id, fields

      changed: (id, fields) =>
        @sourceUpdated id, fields

setupObservers = ->
  setupTargetObservers = (fields) ->

      return

    # We omit _id because that field cannot be changed, or even $set to the same value, but is in target
    @_updateSource target._id, _.omit target, '_id'

Document = class extends Document
  @_sourceFieldUpdated: (id, name, value, field) ->
    # TODO: Should we check if field still exists but just value is undefined, so that it is the same as null? Or can this happen only when removing the field?
    return if _.isUndefined value

