code: @Override
    @SuppressWarnings("unchecked")
    public <E extends Entity> Iterable<E> getEntities(String attributeName, Class<E> clazz) {
      Iterable<E> entities = delegate().getEntities(attributeName, clazz);
      if (clazz.equals(FileMeta.class)) {
        return stream(entities)
            .map(this::newPretendingEntity)
            .map(e -> (E) new FileMeta(e))
            .collect(toList());
      } else {
        throw new UnsupportedOperationException("Can't return typed pretending entities");
      }
    }
docs: Because the File datatype has a reference to {@link FileMetaMetadata} it can happen that a
  typed FileMeta Entity is requested.