{
DatastoreContainerObject mappingTable = m.getDatastoreContainer();
if (fmd.getTable() != null && mappingTable instanceof SecondaryDatastoreClass)
{
// Secondary table field
SecondaryDatastoreClass secTable = (SecondaryDatastoreClass)mappingTable;
if (secTable.getJoinMetaData().isOuter())
{
// Outer join
expressionsIndex = fetchStmt.selectOuterJoin(secTable.getIDMapping(), m, null, null, true);
}
else
{
// Inner join, so just select the fields and FetchStatement does the rest
expressionsIndex = new int[m.getNumberOfDatastoreFields()];