title: EntityManager merge function setting non-set values of the obect to null
body: <p>em.merge() updating uninitialized properties of the entity to null..    </p>
  
  <pre><code>@PersistenceContext
  public EntityManager em;
  
      em.merge(invoice);
  </code></pre>
  
  <p>in my database it is updating all the values which were set in invoice object, 
  as well as it is updating others to null as in invoice object those values were null.</p>
  
  <p>what is the alternative of it so that i will update the object set values only.</p>