When using Custom Metadata in Apex with a field of type "Metadata Relationship(Entity Definition)", the inspector incorrectly reports a reference to the QualifiedApiName as an error.
e.g. if I have a My_Metadata__mdt with a field called
, then I should be able to write
List<My_Metadata__mdt> myMetadata = [SELECT My_Entity__r.QualifiedApiName FROM My_Metadata__mdt];
The inspector says that
is an unresolved reference.