code: private void prefetchRelationships(Query query)
      {
          List prefetchedRel;
          Collection owners;
          String relName;
          RelationshipPrefetcher[] prefetchers;
  
          if (query == null || query.getPrefetchedRelationships() == null || query.getPrefetchedRelationships().isEmpty())
          {
              return;
          }
  
          if (!supportsAdvancedJDBCCursorControl())
          {
              logger.info("prefetching relationships requires JDBC level 2.0");
              return;
          }
  
          // prevent releasing of DBResources
          setInBatchedMode(true);
  
          prefetchedRel = query.getPrefetchedRelationships();
          prefetchers = new RelationshipPrefetcher[prefetchedRel.size()];
  
          // disable auto retrieve for all prefetched relationships
          for (int i = 0; i < prefetchedRel.size(); i++)
          {
              relName = (String) prefetchedRel.get(i);
              prefetchers[i] = getBroker().getRelationshipPrefetcherFactory()
                      .createRelationshipPrefetcher(getQueryObject().getClassDescriptor(), relName);
              prefetchers[i].prepareRelationshipSettings();
          }
  
          // materialize ALL owners of this Iterator
          owners = getOwnerObjects();
  
          // prefetch relationships and associate with owners
          for (int i = 0; i < prefetchedRel.size(); i++)
          {
              prefetchers[i].prefetchRelationship(owners);
          }
  
          // reset auto retrieve for all prefetched relationships
          for (int i = 0; i < prefetchedRel.size(); i++)
          {
              prefetchers[i].restoreRelationshipSettings();
          }
  
          try
          {
              getRsAndStmt().m_rs.beforeFirst(); // reposition resultset jdbc 2.0
          }
          catch (SQLException e)
          {
              logger.error("beforeFirst failed !", e);
          }
  
          setInBatchedMode(false);
          setHasCalledCheck(false);
      }
docs: prefetch defined relationships requires JDBC level 2.0, does not work
  with Arrays