       added: (id, fields) =>
         return if _.isEmpty fields
 
-        @updateSource id, fields
+        @_updateSource id, fields
 
       changed: (id, fields) =>
-        @updateSource id, fields
+        @_updateSource id, fields
 
       removed: (id) =>
-        @removeSource id
+        @_removeSource id
 
   updatedWithValue: (id, value) =>
     unless _.isObject(value) and _.isString(value._id)

      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


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

