code: private void addTableGenerator(ApplicationMetadata appMetadata, String persistenceUnit, List<TableInfo> tableInfos,
              EntityMetadata entityMetadata)
      {
          Metamodel metamodel = appMetadata.getMetamodel(persistenceUnit);
          IdDiscriptor keyValue = ((MetamodelImpl) metamodel).getKeyValue(entityMetadata.getEntityClazz().getName());
          if (keyValue != null && keyValue.getTableDiscriptor() != null)
          {
              TableInfo tableGeneratorDiscriptor = new TableInfo(keyValue.getTableDiscriptor().getTable(),
                      "CounterColumnType", String.class, keyValue.getTableDiscriptor().getPkColumnName());
              if (!tableInfos.contains(tableGeneratorDiscriptor))
              {
                  tableGeneratorDiscriptor.addColumnInfo(getJoinColumn(tableGeneratorDiscriptor,
                          keyValue.getTableDiscriptor().getValueColumnName(), Long.class));
                  tableInfos.add(tableGeneratorDiscriptor);
              }
          }
      }
docs: Add tableGenerator to table info.
  
  @param appMetadata
  @param persistenceUnit
  @param tableInfos
  @param entityMetadata
  @param isCompositeId