title: Hibernate validator for @Embeddable
body: <p>I am having an entity that has embedded property and using Hibernate validator to validate the Entity . But validation is not performed for embedded property .</p>
  
  <p>Code snippet below.</p>
  
  <pre><code>@Entity
  @Table(name = "FV_TBL_SOI_IGLS")
  public class IGLSDataBean implements Serializable {
  
  /**
   * 
   */
  private static final long serialVersionUID = -7274784548705371043L;
  
  public IGLSDataBean() {
  
  }
  
  /*
   * @Column(name="FUND_CODE") private String fundCode;
   */
  @Size(min = 0, max = 120)
  @Column(name = "FUND_NAME")
  private String fundName;
  @Size(min = 0, max = 255)
  @Column(name = "SECURITY_NAME")
  
       @Valid
  @EmbeddedId
  private SOIPK id;
  
  @Embeddable
  public class SOIPK implements Serializable {
  @NotNull
  @Column(name = "SEC_ID")
  private String secid;
  
  Set&lt;ConstraintViolation&lt;IGLSDataBean&gt;&gt; constraintViolations = validator
              .validate(iglsDataBean);
  </code></pre>