/**
* Creates the expr from the path.
*/
public AmberExpr createField(QueryParser parser, String fieldName)
{
AmberField field = null;
BeanType type = getTargetType();
do {
field = type.getField(fieldName);
if (type instanceof EntityType)
type = ((EntityType) type).getParentType();
else // XXX
type = null;
}
while ((type != null) && (field == null));
if (field == null)
throw new AmberRuntimeException(L.l("'{0}' is an unknown field of '{1}' which has the following list of fields '{2}'",
fieldName, getTargetType().getName(),
getTargetType().getFields()));
return field.createExpr(parser, this);
}