code: public final List findByRowKeys(Class entityClass, List<String> relationNames, boolean isWrapReq,
          EntityMetadata metadata, Object... rowIds) {
          List entities = null;
  
          MetamodelImpl metaModel =
              (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(metadata.getPersistenceUnit());
  
          EntityType entityType = metaModel.entity(metadata.getEntityClazz());
  
          List<AbstractManagedType> subManagedType = ((AbstractManagedType) entityType).getSubManagedType();
  
          try {
              if (!subManagedType.isEmpty()) {
                  for (AbstractManagedType subEntity : subManagedType) {
                      EntityMetadata subEntityMetadata =
                          KunderaMetadataManager.getEntityMetadata(kunderaMetadata, subEntity.getJavaType());
                      entities = getDataHandler().fromThriftRow(entityClass, subEntityMetadata,
                          subEntityMetadata.getRelationNames(), isWrapReq, getConsistencyLevel(), rowIds);
  
                      if (entities != null && !entities.isEmpty()) {
                          break;
                      }
                  }
              } else {
                  entities = getDataHandler().fromThriftRow(entityClass, metadata, relationNames, isWrapReq,
                      getConsistencyLevel(), rowIds);
              }
          } catch (Exception e) {
              log.error("Error while retrieving records for entity {}, row keys {}", entityClass, rowIds);
              throw new KunderaException(e);
          }
          return entities;
      }
docs: Finds a {@link List} of entities from database.
  
  @param entityClass
  the entity class
  @param relationNames
  the relation names
  @param isWrapReq
  the is wrap req
  @param metadata
  the metadata
  @param rowIds
  the row ids
  @return the list