title: Retrieving names of all entities that has a relationship mapping to a particular entity in Hibernate
body: <p>Let us say I have an entity EntityA and it has the following relationship mappings</p>
  <pre><code>@Entity
  public class EntityA{
  
      @OneToOne
      private EntityB entityB;
      
      @OneToMany
      private EntityC entityC;
  }
  </code></pre>
  <p>something like this.
  I want to get the list of entity relationship mappings and their type. So for EntityA I am expecting something like this :</p>
  <hr />
  <p>EntityA -</p>
  <ol>
  <li>EntityB   - <strong>One to One</strong></li>
  <li>EntityC   - <strong>One to Many</strong></li>
  </ol>
  <hr />
  <p>Is there any hibernate or any other tool to achieve this?</p>
  <p>Thanks in advance.</p>