code: protected void addRelationsToThriftRow(EntityMetadata metadata, ThriftRow tf, List<RelationHolder> relations) {
          if (relations != null) {
              long timestamp = generator.getTimestamp();
              MetamodelImpl metaModel =
                  (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(metadata.getPersistenceUnit());
              for (RelationHolder rh : relations) {
                  String linkName = rh.getRelationName();
                  Object linkValue = rh.getRelationValue();
  
                  if (linkName != null && linkValue != null) {
                      if (metaModel.getEmbeddables(metadata.getEntityClazz()).isEmpty()) {
                          if (metadata.isCounterColumnType()) {
                              CounterColumn col = populateCounterFkey(linkName, linkValue);
                              tf.addCounterColumn(col);
                          } else {
                              Column col = populateFkey(linkName, linkValue, timestamp);
                              tf.addColumn(col);
                          }
  
                      } else {
                          if (metadata.isCounterColumnType()) {
                              CounterSuperColumn counterSuperColumn = new CounterSuperColumn();
                              counterSuperColumn.setName(linkName.getBytes());
                              CounterColumn column = populateCounterFkey(linkName, linkValue);
                              counterSuperColumn.addToColumns(column);
                              tf.addCounterSuperColumn(counterSuperColumn);
                          } else {
                              SuperColumn superColumn = new SuperColumn();
                              superColumn.setName(linkName.getBytes());
                              Column column = populateFkey(linkName, linkValue, timestamp);
                              superColumn.addToColumns(column);
                              tf.addSuperColumn(superColumn);
                          }
                      }
                  }
              }
          }
      }
docs: Adds relation foreign key values as thrift column/ value to thrift row.
  
  @param metadata
  the metadata
  @param tf
  the tf
  @param relations
  the relations