public function exists($id = null, $additionalConditions = null) {
if ($id === null) {
$id = $this->getID();
}
if ($id === false) {
return false;
}
$conditions = array($this->alias . '.' . $this->primaryKey => $id);
if ($this->schema('delete_flag') != null) {
$conditions[$this->alias . '.delete_flag'] = 0;
}
if ($additionalConditions !== null && is_array($additionalConditions)) {
$conditions = array_merge($conditions, $additionalConditions);
}
return (bool) $this->find('count', array('conditions' => $conditions, 'recursive' => -1, 'callbacks' => false));
}