code: function resolveRelated(np) {
  
      var fkNames = np.foreignKeyNames;
      if (fkNames.length === 0) return;
  
      var parentEntityType = np.parentType;
      var fkProps = fkNames.map(function (fkName) {
        return parentEntityType.getDataProperty(fkName);
      });
      var fkPropCollection = parentEntityType.foreignKeyProperties;
  
      fkProps.forEach(function (dp) {
        __arrayAddItemUnique(fkPropCollection, dp);
        dp.relatedNavigationProperty = np;
        // now update the inverse
        __arrayAddItemUnique(np.entityType.inverseForeignKeyProperties, dp);
        if (np.relatedDataProperties) {
          __arrayAddItemUnique(np.relatedDataProperties, dp);
        } else {
          np.relatedDataProperties = [dp];
        }
      });
    }
docs: sets navigation property: relatedDataProperties and dataProperty: relatedNavigationProperty