code: private void populateSecondaryTableData(Object rowId, Object entity, MetamodelImpl metaModel,
          EntityMetadata metadata) {
          AbstractManagedType managedType = (AbstractManagedType) metaModel.entity(metadata.getEntityClazz());
          List<String> secondaryTables =
              ((DefaultEntityAnnotationProcessor) managedType.getEntityAnnotation()).getSecondaryTablesName();
  
          for (String tableName : secondaryTables) {
              StringBuilder builder = createSelectQuery(rowId, metadata, tableName);
              ResultSet rSet = this.execute(builder.toString(), null);
  
              Iterator<Row> rowIter = rSet.iterator();
  
              Row row = rowIter.next();
              ColumnDefinitions columnDefs = row.getColumnDefinitions();
              Iterator<Definition> columnDefIter = columnDefs.iterator();
  
              entity = iteratorColumns(metadata, metaModel, metaModel.entity(metadata.getEntityClazz()),
                  new HashMap<String, Object>(), entity, row, columnDefIter);
          }
      }
docs: Populates data form secondary tables of entity for given row key.
  
  @param rowId
  the row id
  @param entity
  the entity
  @param metaModel
  the meta model
  @param metadata
  the metadata