code: private List<AbstractManagedType> getSubManagedType(Class entityClass, EntityMetadata entityMetadata)
      {
          MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                  entityMetadata.getPersistenceUnit());
  
          EntityType entityType = metaModel.entity(entityClass);
  
          List<AbstractManagedType> subManagedType = ((AbstractManagedType) entityType).getSubManagedType();
          return subManagedType;
      }
docs: Gets the sub managed type.
  
  @param entityClass
  the entity class
  @param entityMetadata
  the entity metadata
  @return the sub managed type