*/
@Override
public void visit(AbstractSchemaName expression) {
String abstractSchemaName = expression.getText();
IManagedType managedType = getManagedType(abstractSchemaName);
// If a subquery defined in a WHERE clause of an update query,
// then check for a path expression
if (managedType == null) {
// Find the identification variable from the UPDATE range declaration
IdentificationVariable identificationVariable = findVirtualIdentificationVariable(expression);
String variableName = (identificationVariable != null) ? identificationVariable.getText() : null;
if (ExpressionTools.stringIsNotEmpty(variableName)) {
Resolver parentResolver = queryContext.getResolver(identificationVariable);
Resolver resolver = buildStateFieldResolver(parentResolver, abstractSchemaName);
// Does not resolve to a valid path
if (!resolver.getType().isResolvable()) {
addProblem(expression, StateFieldPathExpression_NotResolvable, expression.toParsedText());
}
// Is not a relationship mapping
else if (!MappingTypeHelper.isRelationshipMapping(resolver.getMapping())) {
addProblem(expression, PathExpression_NotRelationshipMapping, expression.toParsedText());
}
}
// The managed type does not exist
else {
addProblem(expression, AbstractSchemaName_Invalid, abstractSchemaName);
}
}
// The managed type cannot be resolved
else if (!managedType.getType().isResolvable()) {
addProblem(expression, AbstractSchemaName_NotResolvable, abstractSchemaName);
}
}