Override for specific title lookups.
Overrides ManyToOne::title_query
function title_query() {
$titles = array();
$result = db_select('taxonomy_term_data', 'td')
->fields('td', array(
'name',
))
->condition('td.tid', $this->value)
->execute();
foreach ($result as $term) {
$titles[] = check_plain($term->name);
}
return $titles;
}