title: Update document in Mongodb-dataneucleus
body: <p>I've a web project that includes java class with JDO annotation. My database is MongoDB. I use datanucleus in my project. To persist my java object in my database, I use this code :</p>
  
  <pre><code>    ListAcc list = new ListAcc();
      list.name = "created";
      pm.makePersistent(list);
  </code></pre>
  
  <p>Then, I retrieve my document with this code :</p>
  
  <pre><code>    ListAcc l = pm.getObjectById(ListAcc.class,"507675823004b91181edc746");
  </code></pre>
  
  <p>Until that point, everything is working. Now, I'd like to update my document. For doing that, I use this code :</p>
  
  <pre><code>    Transaction tx = pm.currentTransaction();
      tx.begin();
      try {
        ListAcc l = pm.getObjectById(ListAcc.class,"507675823004b91181edc746");
        l.name = "changing";
        tx.commit();
      } catch(Exception e) {
        tx.rollback();
      }
  </code></pre>
  
  <p>However, this operation doesn't update my document.</p>
  
  <p>Could you help me to update my document?</p>
  
  <p>Thanks a lot</p>