public function deleteByPk($keys)
{
if (count($keys) == 0) {
return 0;
}
$where = $this->getCompositeKeyCondition((array) $keys);
$command = $this->getBuilder()->createDeleteCommand($where);
$this->onCreateCommand($command, new TSqlCriteria($where, $keys));
$command->prepare();
return $this->onExecuteCommand($command, $command->execute());
}