       # Validate props with the Schema
       val = t.validate @attributes, @Schema
       throw val.errors if not val.isValid()
-
-      # Check if there is a ID type
-      for k, v in @Schema.meta.props
-        if v.name is 'ID' and not (yield @.findById (@get k))
-          throw new Error "No items associated with this ID in the database"
 
       yield return
 

      super() # Don't forget to run config of the Mother
      @before 'save', 'validate'

      if @haveSchema

        # Check if there is unique types
        for k, v in @Schema.meta.props
          @.index k, unique: yes if v.name is 'unique'

    validate: ->

      return if not @haveSchema

  t.refinement Type, (-> yes), 'unique'

regexID = /^(?=[a-f\d]{24}$)(\d+[a-f]|[a-f]+\d)/i
ID      = (Model) ->
  t.refinement t.String, (str) ->
    return no unless regexID.test str
    return no unless (yield Model.findById str)
    return yes

Mongorito          = require 'mongorito'
Mongorito.Model    = patch Mongorito.Model
