code: public T getById(PK pk) {
          try {
              tx.begin();
              T entity = repository.getById(pk);
              loadGraph(entity);
              tx.commit();
              return entity;
          } catch (Exception x) {
              throw new RuntimeException(x);
          }
      }
docs: /*
  Get the entity by id and load its graph using loadGraph.