code: private void translateCompositeId(final Object record, final EntityMetadata m, TranslationType type,
              MetamodelImpl metaModel, Map<String, StringBuilder> builders, Map<String, StringBuilder> columnBuilders,
              Map<String, Object> externalProperties, final KunderaMetadata kunderaMetadata, String tableName,
              SingularAttribute attribute)
      {
          StringBuilder builder = builders.get(tableName);
          StringBuilder columnBuilder = columnBuilders.get(tableName);
          Field field = (Field) attribute.getJavaMember();
          if (metaModel.isEmbeddable(((AbstractAttribute) attribute).getBindableJavaType()))
          {
              // builder.
              // Means it is a compound key! As other
              // iterate for it's fields to populate it's values in
              // order!
              EmbeddableType compoundKey = metaModel.embeddable(field.getType());
              Object compoundKeyObj = PropertyAccessorHelper.getObject(record, field);
              for (Field compositeColumn : field.getType().getDeclaredFields())
              {
                  if (!ReflectUtils.isTransientOrStatic(compositeColumn))
                  {
                      attribute = (SingularAttribute) compoundKey.getAttribute(compositeColumn.getName());
                      if (metaModel.isEmbeddable(((AbstractAttribute) attribute).getBindableJavaType()))
                      {
                          translateCompositeId(compoundKeyObj, m, type, metaModel, builders, columnBuilders,
                                  externalProperties, kunderaMetadata, tableName, attribute);
                      }
                      else
                      {
                          onTranslation(type, builder, columnBuilder,
                                  ((AbstractAttribute) (compoundKey.getAttribute(compositeColumn.getName())))
                                          .getJPAColumnName(), compoundKeyObj, compositeColumn);
                      }
                  }
              }
          }
          else if (!ReflectUtils.isTransientOrStatic(field))
          {
              onTranslation(type, builder, columnBuilder,
                      CassandraUtilities.getIdColumnName(kunderaMetadata, m, externalProperties, true), record, field);
          }
      }
docs: Translate composite id.
  
  @param record
  the record
  @param m
  the m
  @param type
  the type
  @param metaModel
  the meta model
  @param builders
  the builders
  @param columnBuilders
  the column builders
  @param externalProperties
  the external properties
  @param kunderaMetadata
  the kundera metadata
  @param tableName
  the table name
  @param attribute
  the attribute