title: Validation failed for classes Semester during persist time
body: <p>I get the following error when I try to enter invalid value (value &lt; 1 and > 19), but everything work okay if I try to enter a valid value (between 1 and 19)</p>
  
  <pre><code>Validation failed for classes [univ_orientation.dz.Entity.Semester] during persist time for groups [javax.validation.groups.Default, ]
  List of constraint violations:[
      ConstraintViolationImpl{interpolatedMessage='must be greater than or equal to 1', propertyPath=Moyenne, rootBeanClass=class univ_orientation.dz.Entity.Semester, messageTemplate='{javax.validation.constraints.Min.message}'}
  ]
  </code></pre>
  
  <p>`</p>
  
  <pre><code> @Entity
   @Table(name="Semester")
   public class Semester {
  
  @Id
  @GeneratedValue(strategy=GenerationType.IDENTITY) 
  @Column(name="idSemester")
  private int idSemester;
  
  @Column(name="SemesterNumber")
  private int SemesterNumber;
  
  @NotNull
  @Min(1)
  @Max(19)
  @Column(name="Moyenne")
  private double Moyenne;
  
  @Column(name="Credit")
  private int Credit;
  
  @Column(name="Session")
  private String Session;
  
  @ManyToOne( cascade= {CascadeType.DETACH,CascadeType.MERGE,CascadeType.PERSIST,CascadeType.REFRESH},
              fetch=FetchType.EAGER)
  @JoinColumn(name="Student_idStudent")
  private Student student;
  </code></pre>
  
  <p>// getters and setters
  <code>
  my dao
  </code>
              @Override
              public void saveSemester(Semester semester) {</p>
  
  <pre><code>    try {
          Session session = sessionFactory.getCurrentSession();
          session.saveOrUpdate(semester);
  
      }catch(Exception e) {
          saveSemester: "+e.getMessage());
      }
  
  }
  </code></pre>
  
  <p>` </p>