 
     @_isValid = Object.keys(@errors).length == 0 ? true : false
 
+  # @note must be overrided in descendants
+  # @param exception [Boolean] throw exception, when true and instance not valid,
+  # otherwise return false if not valid
+  # @throw Error, when exception in true
   save: (exception = false) ->
     @validate()
     name = @constructor.name

    else
      JSON.stringify(z)


  to_html: () ->
    to = @constructor.to
    for key, attrs of to

        do(attr) ->
          self.set(attr, obj[attr])

  # base setter
  # @throw Error, when attributes not defined for current model
  set: (attr, value) ->
    throw new Error("Attribute '#{attr}' not found for #{@normal_name().toUpperCase()} model") if @attributes.indexOf(attr) == -1

    # TODO validate value
    @["_#{attr}"] = value

  # base getter
  # @throw Error, when attributes not defined for current model
  get: (attr) ->
    throw new Error("Attribute '#{attr}' not found for #{@normal_name().toUpperCase()} model") if @attributes.indexOf(attr) == -1

    @["_#{attr}"]

  # @return [Boolean] check if current model instance is valid
  valid: () ->
    @_isValid

  # @nodoc
  validate: () ->
    @errors = {}
    vv = @validators()
