// Check for multiple table inheritance which may require multiple queries.
if (!getDescriptor().hasInheritance() || !getDescriptor().getInheritancePolicy().requiresMultipleTableSubclassRead()){
setSQLStatement(buildNormalSelectStatement());
super.prepareSelectAllRows();
} else {
InheritancePolicy policy = getDescriptor().getInheritancePolicy();
if (policy.hasView()){
// CR#3158703 if the descriptor has a view, then it requires a single select,
// so can be prepared.
setSQLStatement(getDescriptor().getInheritancePolicy().buildViewSelectStatement((ObjectLevelReadQuery)getQuery()));
super.prepareSelectAllRows();
} else if ( ((ObjectLevelReadQuery)getQuery()).shouldOuterJoinSubclasses() ){