title: what is difference between MappedSuperclass and Embeddable and how should be we used
body: <p>A MappedSuperclass uses inheritance for field and code reuse.</p>
  
  <p>In addition we leverage some composition via Embeddable feature provided Hibernate</p>
  
  <pre><code>@Embeddable
  public class Department {
  
  private long deptId;
  private String name;
  private String description;
  }
  
  @Entity
  @Table(name="CSE_DEPT", schema="test")
  public class CSEDepartment{
  
  @Embedded
  private Department dept;
  }
  </code></pre>
  
  <p>What is difference between @MappedSuperclass and @Embeddable and what is appropriate situation where they use.</p>