I have two references I want to update:
1.
/items/item1/sumlikes: 4
"item1" is liked by 4 users. I need a transaction because multiple users can write this value at the same time: https://firebase.google.com/docs/database/android/read-and-write#save_data_as_transactions
2.
/users/myusername/item1: true
I add "item1" to the the username who liked it.
I would like to have the 1. and 2. writes atomic, so I need to use updateChildren with HashMap like in this example: https://firebase.google.com/docs/database/android/read-and-write#update_specific_fields
But how can I combine this with a transaction? Thank you for your help!