Added support for mapping to classes that inherit fields from parent classes.