function exists($entity_guid, $annotation_type, $owner_guid = null)
{
if (!$owner_guid && !($owner_guid = $this->session->getLoggedInUserGuid())) {
return false;
}
$sql = "SELECT id FROM {$this->db->prefix}annotations\n\t\t\t\tWHERE owner_guid = :owner_guid\n\t\t\t\tAND entity_guid = :entity_guid\n\t\t\t\tAND name = :annotation_type";
$result = $this->db->getDataRow($sql, null, [':owner_guid' => (int) $owner_guid, ':entity_guid' => (int) $entity_guid, ':annotation_type' => $annotation_type]);
return (bool) $result;
}