         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()

          z.set("#{key}", self.get(back))
          #TODO: logs


    for klass in @has_one()
      do(klass) ->
        self["_#{klass}"] = null

          m.set(attr, json[attr])
    m

  # Generate a new model instance from form
  # @note not support a relations
  @from_html: () ->
    #FIXME
    form_name = @.form_name || @.name.replace(/([A-Z])/g, '_$1').replace(/^_/,"").toLowerCase()

    @.from_json(SiriusApplication.adapter.form_to_json("form[name='#{form_name}'"))

