code: private Object populateCompositeId(EntityMetadata metadata, Object entity, String columnName, Row row,
          MetamodelImpl metaModel, Attribute attribute, Class<?> entityClazz, DataType dataType) {
          Class javaType = ((AbstractAttribute) attribute).getBindableJavaType();
  
          if (metaModel.isEmbeddable(javaType)) {
              EmbeddableType compoundKey = metaModel.embeddable(javaType);
              Object compoundKeyObject = null;
              try {
                  Set<Attribute> attributes = compoundKey.getAttributes();
                  entity = KunderaCoreUtils.initialize(entityClazz, entity);
  
                  for (Attribute compoundAttribute : attributes) {
                      compoundKeyObject =
                          compoundKeyObject == null ? getCompoundKey(attribute, entity) : compoundKeyObject;
  
                      if (metaModel.isEmbeddable(((AbstractAttribute) compoundAttribute).getBindableJavaType())) {
                          Object compoundObject = populateCompositeId(metadata, compoundKeyObject, columnName, row,
                              metaModel, compoundAttribute, javaType, dataType);
                          PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), compoundObject);
                      } else if (((AbstractAttribute) compoundAttribute).getJPAColumnName().equals(columnName)) {
                          DSClientUtilities.assign(row, compoundKeyObject, null, dataType.getName(), null, columnName,
                              (Field) compoundAttribute.getJavaMember(), metaModel);
                          PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), compoundKeyObject);
                          break;
                      }
                  }
              } catch (IllegalArgumentException iaex) {
                  // ignore as it might not represented within entity.
                  // No need for any logger message
              } catch (Exception e) {
                  log.error("Error while retrieving data, Caused by: .", e);
                  throw new PersistenceException(e);
              }
          }
          return entity;
      }
docs: Populate composite id.
  
  @param metadata
  the metadata
  @param entity
  the entity
  @param columnName
  the column name
  @param row
  the row
  @param metaModel
  the meta model
  @param attribute
  the attribute
  @param entityClazz
  the entity clazz
  @param dataType
  the data type
  @return the object