/**
  * Aqui el id es el codigo
  * @see \TSLBasicRecordDAO::getUpdateRecordQuery()
  */
 protected function getUpdateRecordQuery(\TSLDataModel &$record)
 {
     /* @var $record  LigasClubesModel  */
     $sql = 'select * from (select sp_ligasclubes_save_record(' . $record->get_ligasclubes_id() . '::integer,' . '\'' . $record->get_ligas_codigo() . '\'::character varying,' . '\'' . $record->get_clubes_codigo() . '\'::character varying,' . '\'' . $record->get_ligasclubes_desde() . '\'::date,' . ($record->get_ligasclubes_hasta() == '' ? 'null' : '\'' . $record->get_ligasclubes_hasta() . '\'') . '::date,' . '\'' . ($record->getActivo() != TRUE ? '0' : '1') . '\'::boolean,' . '\'' . $record->get_Usuario_mod() . '\'::varchar,' . $record->getVersionId() . '::integer,1::BIT) as insupd) as ans where insupd is not null;';
     return $sql;
 }