title: Firebase updatechildren vs setvalue
body: <p>I'm having a problem with valueEvenListener on Firebase. Consider the situation:</p>
  
  <pre><code>Firebase ref = new Firebase(Constant.BASEURL).child("myLists");
  ref.addValueEventListener(myValueEventListener);
  </code></pre>
  
  <p>Then I try do update one of the lists value using updateChildren(). </p>
  
  <pre><code>HashMap&lt;String, Object&gt; newEditionTimeHM = new HasMap&lt;String, Object&gt;
  newEditionTimeHM.put("editionTimeStamp", ServerValue.TIMESTAMP);
  
  ref.child(pushKey).updateChildren(newEditionTimeHM);
  </code></pre>
  
  <p>It updates but when my listener catches the update, it crashes reporting "failed to bounce to type" error.</p>
  
  <p>On my second try, I create a new shoppinList object with the new values I want and push it using setValue(). </p>
  
  <pre><code>newEditionTimeHM.put("editionTimeStamp", ServerValue.TIMESTAMP);
  ShoppingList shoppingList = new ShoppingList("Owner unknown", newEditionTimeHM);
  
  ref.child(pushKey).setValue(shoppingList);
  </code></pre>
  
  <p>When my listeners catches it, no problem is reported.</p>
  
  <p>What is the difference here? Why do I need to create an entirely new object to satisfy the listener? Isn't it more efficient to use updateChildren()?
  Searched <a href="https://www.firebase.com/docs/android/guide/saving-data.html" rel="nofollow">this page</a> for the answer but did not find it.</p>