Limitations When Querying Custom Metadata Types with SOQL

This release includes exciting updates to custom metadata types, but it also brings a few limitations when using SOQL to query a relationship field.
You can’t use the ORDER BY clause on a relationship field of a custom metadata type.
SOQL and Setup (or Metadata API) queries sometimes behave differently.
If you use SOQL to query a custom metadata type, the results include only those records that reference objects you have permission to access. However, a similar query within Setup or using the Metadata API results in all relevant records, including records that reference objects you can’t access.
SOQL limits apply when querying custom metadata types.
When you execute a join query to an EntityDefinition object, the query counts toward your Apex transaction SOQL query limit. If you join to another custom metadata type, however, the query doesn’t count toward your limit.