code: private static void populateEmbeddedIdFields(Set<Attribute> embeddedAttributes, MetamodelImpl metaModel,
              Set<String> embeddedIdFields)
      {
          for (Attribute attribute : embeddedAttributes)
          {
              if (!ReflectUtils.isTransientOrStatic((Field) attribute.getJavaMember()))
              {
                  if (metaModel.isEmbeddable(attribute.getJavaType()))
                  {
                      EmbeddableType embeddable = metaModel.embeddable(attribute.getJavaType());
                      populateEmbeddedIdFieldsUtil(embeddable.getAttributes(), metaModel, embeddedIdFields);
                  }
              }
          }
      }
docs: recursively populate all the fields present in partition key
  
  @param embeddedAttributes
  @param metaModel
  @param embeddedIdFields