code: private boolean optimizeForInclusion(QuerySpec querySpec) {
          ResourceField idField = getIdField();
          return querySpec.getIncludedRelations().size() == 1 &&
                  querySpec.getIncludedFields().size() == 1
                  && idField.getUnderlyingName().equals(querySpec.getIncludedFields().get(0).getPath().toString());
      }
docs: if single relationship is requested, perform eager loading. For example, helps to
  optimize loading uni-directional associations during inclusions (used the default
  relationship repositories)