title: dynamicUpdate not working in hibernate
body: <p>I have a customer table in which there are 3 columns i.e. id,name and age.</p>
  
  <p>If I make a customer object with no age i.e. I don't set any age value, then in case if the same customer(identified by customer id) is present in the table, then saveOrUpdate() updates the age column to 0. I am looking to avoid the age column value to be overwritten by zero or null, if already present in the table.For e.g. as per the code snippet pasted below, if there is already a row exists for the customer id 10 with some age value, then in this case, my age should not be overwritten by zero.</p>
  
  <p>I searched on google and found that I can set dynamicUpdate to true to achieve that. But on executing the code still my age value is overwritten by 0. I am pasting the code snippet</p>
  
  <pre><code>@Entity
  @Table(name = "CUSTOMER")
  @org.hibernate.annotations.Entity(
          dynamicUpdate = true
  )
  public class Customer {
  
      @Id
      @GeneratedValue
      @Column(name = "CUSTOMER_ID")
      private int custId;
  
      @Column(name = "CUSTOMER_NAME")
      private String custName;
  
      @Column(name = "CUSTOMER_AGE")
      private int custAge;
          ............
          ...........
  
         Customer cust = new Customer();
         cust.setCustId(10);
         cust.setCustName("anand");       
         session.saveOrUpdate(cust);      
         tx.commit();
  </code></pre>