code: private <X> void populateRelationMetaData(EntityType entityType, Class<X> clazz, EntityMetadata metadata)
      {
          Set<Attribute> attributes = entityType.getAttributes();
  
          for (Attribute attribute : attributes)
          {
              if (attribute.isAssociation())
              {
  
                  addRelationIntoMetadata(clazz, (Field) attribute.getJavaMember(), metadata);
              }
          }
  
      }
docs: Populate metadata.
  
  @param entityType
  the EntityType
  @param <X>
  the generic type
  @param metadata
  the metadata
  @throws RuleValidationException