protected function setFieldsTypeByName()
  {
    foreach($this->getFields() as $fieldName => $fieldInfos){
      $v = $this->row->get($fieldName);
      
      switch($fieldInfos->Type){
        case 'bigint':
        case 'mediumint':
        case 'smallint':
        case 'tinyint':
        case 'int':
          $this->row->set($fieldName, (int)$v); 
          break;
        
        case 'datetime':
        case 'timestamp':
          if ( $v === $this->db->getNullDate(true) ){
            $this->row->set($fieldName, ''); 
          }
          break;
        
        case 'date':
          if ( $v === $this->db->getNullDate(false) ){
            $this->row->set($fieldName, ''); 
          }
          break;
        
        case 'time':
          if ( $v === '00:00:00' ){
            $this->row->set($fieldName, ''); 
          }
          break;
      }
      
      if ( $fieldName === 'published' ){
        $this->row->set($fieldName, (bool)$v); 
      }
    }
  }