public function DBInsertNoReload() { $oMutex = new iTopMutex('ticket_insert'); $oMutex->Lock(); $iNextId = MetaModel::GetNextKey(get_class($this)); $sRef = $this->MakeTicketRef($iNextId); $this->Set('ref', $sRef); $iKey = parent::DBInsertNoReload(); $oMutex->Unlock(); return $iKey; }