// TODO This only selects one field of the application identity ... as APP_ID.
// If multiple we should have APP_ID1, APP_ID2, etc. It also only looks at the first table
JavaTypeMapping m = tables[0].getFieldMapping(cmd.getMetaDataForManagedMemberAtAbsolutePosition(prefetchFieldNumbers[i]));
if (m != null) // field is not stored in the table, e.g List, Set, etc or is transactional
{
if (m.includeInFetchStatement() && !(m instanceof AbstractContainerMapping))
{
statementExpressionIndex[prefetchFieldNumbers[i]] = new StatementExpressionIndex();
statementExpressionIndex[prefetchFieldNumbers[i]].setMapping(m);
statementExpressionIndex[prefetchFieldNumbers[i]].setExpressionIndex(stmt.selectField(fieldName, "APP_ID", true));
}