Change values in Firebase database nodes by a given criteria
<p>I implemented some kind of chat app using Firebase database. Everything is set and working. Now I am trying to implement functionality that after user name changes all his messages with new username. The Message structure looks like this:</p>

<p><a href="https://i.stack.imgur.com/iMNns.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iMNns.jpg" alt="enter image description here"></a></p>

<p>I had success whit this code:</p>

<pre><code>private void changeCurrentUserMessagesUserName(final String newUserName) {
    mDatabase.child(RequestParameters.FB_CHILD_MESSAGES) //messages
            .orderByChild(RequestParameters.FB_CHILD_USERS_UID) //messageUserUid
            .equalTo(mUser.getUid())
            .addListenerForSingleValueEvent(new ValueEventListener() {
                @Override
                public void onDataChange(DataSnapshot dataSnapshot) {
                    for (DataSnapshot messageSnapshot : dataSnapshot.getChildren()) {
                        ChatMessage message = messageSnapshot.getValue(ChatMessage.class);

                        mDatabase.child(RequestParameters.FB_CHILD_MESSAGES) //messages
                                .child(message.getMessageNodeKey()) 
                                .child(RequestParameters.FB_CHILD_MESSAGES_USERS) //messageUser
                                .setValue(newUserName);
                    }
                }

                @Override
                public void onCancelled(DatabaseError databaseError) {
                    //do nothing
                }
            });
}
</code></pre>

<p>But it smells, if there are 100 messages in Firebase that belongs to current user this code will make 100 request to Firebase to change "messageUser" node to every single message. 
Anyone could help how to make just one request that?</p>