public function JoinAssociationPathExpression()
{
$token = $this->_lexer->lookahead;
$identVariable = $this->IdentificationVariable();
$this->match(Lexer::T_DOT);
$this->match(Lexer::T_IDENTIFIER);
$field = $this->_lexer->token['value'];
// Validate association field
$qComp = $this->_queryComponents[$identVariable];
$class = $qComp['metadata'];
if ( ! isset($class->associationMappings[$field])) {
$this->semanticalError('Class ' . $class->name . ' has no association named ' . $field);
}
return new AST\JoinAssociationPathExpression($identVariable, $field);
}