 INVALID_TARGET = "Invalid target document or collection"
-UNDEFINED_SOURCE_DOCUMENT = "Undefined source document"
-UNDEFINED_SOURCE_PATH = "Undefined source path"
-UNDEFINED_TARGET_COLLECTION = "Undefined target collection"
-UNDEFINED_TARGET_DOCUMENT = "Undefined target document"
 
 isPlainObject = (obj) ->
   if not _.isObject(obj) or _.isArray(obj) or _.isFunction(obj)

      @sourceCollection = @sourceDocument.Meta.collection

    validate: =>
      throw new Error UNDEFINED_SOURCE_DOCUMENT unless @sourceDocument
      throw new Error UNDEFINED_SOURCE_PATH unless @sourcePath

  @_ObservingField: class extends @_Field


    validate: =>
      super()

      throw new Error "Undefined target collection" unless @targetCollection
      throw new Error "Undefined target document" if _.isUndefined @targetDocument

  @_ReferenceField: class extends @_TargetedFieldsObservingField
    constructor: (targetDocumentOrCollection, fields, @required) ->
