1 Reply Latest reply on Apr 25, 2009 5:29 PM by gonorrhea

    Hibernate @Valid Annotation

    jai_naga_rani

      Hi,
        I want to know how @Valid annotation works for One to many Relation.


      It doesn't seems to be working for,


      @Valid
      public List(Object) getXXX(){


      }
      I am using list and  need to be validated on time of setting.(I am not persisting while setting), I am persisting when the parent object is persisting.

        • 1. Re: Hibernate @Valid Annotation
          gonorrhea

          I found nothing on @Valid in the Hibernate ref doc or JPA/Hibernate book or Seam in Action...


          There is reference to is here: www.hibernate.org/hibdocs/validator/reference/en/htmlsingle/




          @Valid     property (object)     perform validation recursively on the associated object. If the object is a Collection or an array, the elements are validated recursively. If the object is a Map, the value elements are validated recursively.     none


          In any event, you should post this question on the Hibernate forum when it's back up...