using hook_query_alter with fieldcondition() I want to use hook_query_alter to alter a query constructed by a module. This is the code I use:

function MYMODULE_query_alter($query) {
  if ($query-&gt;hasTag('agent')) {
    $query-&gt;fieldCondition('field_area', 'tid', 10, '=');
  }
}


The code above gives a 500 error: Call to undefined method SelectQuery::fieldCondition() 

What is the proper way to add a field condition to the query?
This was solved using the $query->innerJoin()