Hmmmm...I just tried to reproduce this in a naive fashion by creating two custom metadata types with a relationship between them, then I generated the OST. I see both sides of the relationship properly rendered into the OST:
/**
* <h3>Parent MDT</h3>
*/
global class Parent_MDT__mdt extends SObject
{
global List<Child_MDT__mdt> Child_MDTs__r;
global String DeveloperName;
global static final SObjectTypeFields fields;
global String Label;
global String Language;
global String MasterLabel;
global String NamespacePrefix;
global String QualifiedApiName;
global SObjectType SObjectType;
global Parent_MDT__mdt()
{
}
}
and:
/**
* <h3>Child MDT</h3>
*/
global class Child_MDT__mdt extends SObject
{
global String DeveloperName;
global static final SObjectTypeFields fields;
global String Label;
global String Language;
global String MasterLabel;
global String NamespacePrefix;
/**
* <h3>Parent MDT</h3>
* <h3>Field Attributes</h3>
* <table border="0" valign="top">
* <tr><td><b>Data Type:</b></td><td>Metadata Relationship</td></tr>
* <tr><td><b>Required:</b></td><td>true</td></tr>
* <tr><td><b>Unique:</b></td><td>false</td></tr>
* <tr><td><b>External ID:</b></td><td>false</td></tr>
* </table>
*/
global Id Parent_MDT__c;
/**
* <h3>Parent MDT</h3>
* <h3>Field Attributes</h3>
* <table border="0" valign="top">
* <tr><td><b>Data Type:</b></td><td>Metadata Relationship</td></tr>
* <tr><td><b>Required:</b></td><td>true</td></tr>
* <tr><td><b>Unique:</b></td><td>false</td></tr>
* <tr><td><b>External ID:</b></td><td>false</td></tr>
* </table>
*/
global Parent_MDT__mdt Parent_MDT__r;
global String QualifiedApiName;
global SObjectType SObjectType;
global Child_MDT__mdt()
{
}
}
I tried this both with and without the corresponding *_mdt files in the local project, and both ways the OST looks correct to me.
Is there something else about these relationship fields that aren't getting properly rendered into the OST, or are they just standard MDT-to-MDT relationship fields? Assuming that they are stock-standard MDT relationship fields, I'll likely need to get detailed debug logs from OST generation from one or both of you to continue trying to diagnose this.
Regards,
Scott