code: private void onCheckRelation()
      {
          try
          {
              results = populateEntities(entityMetadata, client);
  
              if (entityMetadata.isRelationViaJoinTable()
                      || (entityMetadata.getRelationNames() != null && !(entityMetadata.getRelationNames().isEmpty())))
              {
                  query.setRelationalEntities(results, client, entityMetadata);
              }
          }
          catch (Exception e)
          {
              throw new PersistenceException("Error while scrolling over results, Caused by :.", e);
          }
      }
docs: on check relation event, invokes populate entities and set relational
  entities, in case relations are present.