public function insert($data)
{
$command = $this->getBuilder()->createInsertCommand($data);
$this->onCreateCommand($command, new TSqlCriteria(null, $data));
$command->prepare();
if ($this->onExecuteCommand($command, $command->execute()) > 0) {
$value = $this->getLastInsertId();
return $value !== null ? $value : true;
}
return false;
}