/**
  * Iterator: get current item
  *
  * @throws Exception\LogicException whenever a record cannot be instanciated, due to missing column specs
  * @return Record
  */
 public function current()
 {
     $data = $this->dataSource->current();
     if (!$this->has_complete_record_definition) {
         $data_columns = array_keys($this->table->getColumnsInformation());
         $record_columns = array_keys((array) $data);
         $matches = array_intersect($data_columns, $record_columns);
         if (count($matches) != count($data_columns)) {
             $missings = join(',', array_diff($data_columns, $record_columns));
             $msg = __METHOD__ . ": Cannot create a Record due to incomplete or aliased column definition (missing: {$missings}).";
             $msg .= "Check whether columns have been modified in TableSearch::columns() method, or use an toArray(), toJson()... version of the ResultSet.";
             throw new Exception\LogicException($msg);
         }
         $this->has_complete_record_definition = true;
     }
     $record = $this->table->record($data, $ignore = true);
     $record->setState(Record::STATE_CLEAN);
     return $record;
 }