2 Replies Latest reply on Nov 15, 2007 5:08 PM by Pete Muir

    Changes applied only to Custom Datatype in a entity not save

    Ravi Nallakukkala Newbie

      I'm using Seam 2.0.0.GA
      I have an entity which has a custom data type

      @Entity
      @Table(name = "CST_Customer")
      public class Customer extends AbstractRevisionableEntity {
      
      
       private Password password;
      
       @org.hibernate.annotations.Type(type = "password")
       @Column(name = "password",updatable = true)
       public Password getPassword() {
       return password;
       }
      
       public void setPassword(Password plaintext) {
       this.password = plaintext;
       }
      
      }
      


      Using entity home for data persistance, following is my xhtml file usage,

       <s:decorate id="passwordDecorate" template="#{contextTheme.editField_decorator}">
       <ui:define name="label">Password</ui:define><br/>
       <h:inputText value="#{customer.password}" required="true" converter="passwordConverter">
       <a4j:support event="onblur" reRender="passwordDecorate" bypassUpdates="true"/>
       </h:inputText>
       </s:decorate>
      


      The problem is, if I make change only to the password field and do a submit, changes are not reflected on the database (there is no error on the console & the entity do has the modified value in the entityHome's persist method).

      when tried to update password field in conjunction with a non custom data type field, I could see both modified values are reflected in the database.

      any suggestion, what's that I'm missing? can custom data type alone can cause the problem?

      Cheers
      Ravi