I have Firebase structure which contains Users and Groups in Android. It's a many to many relationship.
When I am adding any user in the group node, I also add the group in the user node but without using any kind of transaction mechanism.
Now I need to do the delete group case where it will remove the Group node as well as the group property inside User Node where each User Joined. There must be a transaction in this scenario. So far i have dealt with the transaction code which relies on the same node but not on different node.
I need to know how to implement transaction in case of adding and deletion on multiple nodes or is there a better way of implementing it.