MappedStoreManager srm = qs.getStoreManager();
int relationType = fmd.getRelationType(clr);
if (relationType == Relation.ONE_TO_ONE_BI)
{
// Create an expression joining to the related field in the related table
DatastoreClass targetTable = srm.getDatastoreClass(fmd.getTypeName(), clr);
AbstractMemberMetaData[] relatedMmds = fmd.getRelatedMemberMetaData(clr);
// TODO Cater for more than one related field
JavaTypeMapping refMapping = targetTable.getFieldMapping(relatedMmds[0]);
JavaTypeMapping selectMapping = targetTable.getIDMapping();
DatastoreIdentifier targetTableIdentifier =
srm.getIdentifierFactory().newIdentifier(IdentifierFactory.TABLE, "RELATED" + fmd.getAbsoluteFieldNumber());
LogicSetExpression targetTe = qs.newTableExpression(targetTable, targetTableIdentifier);
return new ObjectExpression(qs, this, te, refMapping, targetTe, selectMapping);
}