Field f = ((PropagatedField) selectfields.get(0)).getOriginFields()[0];
if (f instanceof PNameField) {
PNameField pnf = (PNameField) f;
if (pnf.isClassPName() && !pnf.isInGenClass()) {
//Add prefeched fields
ClassExtent ce = (ClassExtent) pnf.getQueryTree();
String prefetchedClassName = ce.getJormName();
HomeItf sh = (HomeItf) mapper.lookup(prefetchedClassName);
if (sh.getPrefetchOnQuery()) {
qec.pcm = sh;
JormQueryTreeHelper.addPrefetchFields(ce, qt, top,
qd.getIncludeSubClasses());