code: @Override
      @SuppressWarnings("unchecked")
      public <T> List<T> getResultList(JPAQuery<T> query, Expression<T> projection) {
          Query jpaQuery = query.createQuery();
  
          if (jpaQuery instanceof QueryImpl) {
              QueryImpl casted = (QueryImpl) jpaQuery;
              if (casted.getDatabaseQuery() instanceof ObjectLevelReadQuery) {
                  Field f = ReflectionUtils.findField(ObjectLevelReadQuery.class, "joinedAttributeManager");
                  f.setAccessible(true);
                  JoinedAttributeManager old = (JoinedAttributeManager) ReflectionUtils.getField(f, casted.getDatabaseQuery());
                  if (old != null) {
                      FixedJoinerAttributeManager newManager = new FixedJoinerAttributeManager(old.getDescriptor(), old.getBaseExpressionBuilder(),
                              old.getBaseQuery());
                      newManager.copyFrom(old);
                      ReflectionUtils.setField(f, casted.getDatabaseQuery(), newManager);
                  }
              }
          }
  
          if (projection instanceof FactoryExpression) {
              FactoryExpression factoryExpression = (FactoryExpression) projection;
  
              List<?> results = jpaQuery.getResultList();
              List<Object> rv = new ArrayList<>(results.size());
              for (Object o : results) {
                  if (o != null) {
                      if (!o.getClass().isArray()) {
                          o = new Object[]{o};
                      }
                      rv.add(factoryExpression.newInstance((Object[]) o));
                  } else {
                      rv.add(null);
                  }
              }
              return (List<T>) rv;
          } else {
              return jpaQuery.getResultList();
          }
      }
docs: TODO test for fixed joinedAttributeManager is missing