title: hibernate bean validation - group validation sequence
body: <p>I cannot get my GroupSequence to work. I want the inner constraint's on the <code>id</code> property to validate first before the unique constraint's are validated. </p>
  
  <p>In each interface</p>
  
  <p><strong>Entity</strong></p>
  
  <pre><code>@UniqueNaturalId(groups = {Create.class, Update.class})
  public abstract Entity
  {
      @Null(groups = {PreCreate.class})
      @NotNull(groups = {PreUpdate.class, PreDelete.class })
      private Integer id;
  
      // other properties without groups
  }
  </code></pre>
  
  <p><strong>Group interfaces</strong></p>
  
  <pre><code>@GroupSequence({PreUpdate.class, Update.class})
  public interface PreUpdate {}
  
  // PreCreate and PreDelete follow same structure
  </code></pre>
  
  <p><strong>Calling groups for update operation</strong></p>
  
  <pre><code>&lt;property name="javax.persistence.validation.group.pre-update"&gt;
      javax.validation.groups.Default, 
      package.PreUpdate
  &lt;/property&gt;
  </code></pre>
  
  <p><strong>Environment</strong></p>
  
  <p>Glassfish 3.1.2 with built-in Hibernate-Validator 4.2.</p>